From 47f4aee3ccc9122ddd4e5f683cd9ae4828d52aec Mon Sep 17 00:00:00 2001 From: minggo Date: Fri, 14 Jun 2013 16:48:18 +0800 Subject: [PATCH 1/2] issue #2284: use GLuint to fix compiling error --- cocos2dx/textures/CCTexture2D.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cocos2dx/textures/CCTexture2D.cpp b/cocos2dx/textures/CCTexture2D.cpp index 95503145bc..89c89c66ca 100644 --- a/cocos2dx/textures/CCTexture2D.cpp +++ b/cocos2dx/textures/CCTexture2D.cpp @@ -807,7 +807,7 @@ void CCTexture2D::setAliasTexParameters() glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST ); #if CC_ENABLE_CACHE_TEXTURE_DATA - ccTexParams texParams = {m_bHasMipmaps?GL_NEAREST_MIPMAP_NEAREST:GL_NEAREST,GL_NEAREST,GL_NONE,GL_NONE}; + ccTexParams texParams = {(GLuint)(m_bHasMipmaps?GL_NEAREST_MIPMAP_NEAREST:GL_NEAREST),GL_NEAREST,GL_NONE,GL_NONE}; VolatileTexture::setTexParameters(this, &texParams); #endif } @@ -827,7 +827,7 @@ void CCTexture2D::setAntiAliasTexParameters() glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR ); #if CC_ENABLE_CACHE_TEXTURE_DATA - ccTexParams texParams = {m_bHasMipmaps?GL_LINEAR_MIPMAP_NEAREST:GL_LINEAR,GL_LINEAR,GL_NONE,GL_NONE}; + ccTexParams texParams = {(GLuint)(m_bHasMipmaps?GL_LINEAR_MIPMAP_NEAREST:GL_LINEAR),GL_LINEAR,GL_NONE,GL_NONE}; VolatileTexture::setTexParameters(this, &texParams); #endif } From 5e83f36433337caf88d07fbc261cc906d5713d08 Mon Sep 17 00:00:00 2001 From: minggo Date: Fri, 14 Jun 2013 17:32:07 +0800 Subject: [PATCH 2/2] issue #2284: not treat using deprecated functions as error --- cocos2dx/proj.emscripten/cocos2dx.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cocos2dx/proj.emscripten/cocos2dx.mk b/cocos2dx/proj.emscripten/cocos2dx.mk index 62297635ef..405a80e971 100644 --- a/cocos2dx/proj.emscripten/cocos2dx.mk +++ b/cocos2dx/proj.emscripten/cocos2dx.mk @@ -16,8 +16,8 @@ PACKAGER := $(EMSCRIPTEN_ROOT)/tools/file_packager.py CC := EMSCRIPTEN=$(EMSCRIPTEN_ROOT) $(COCOS_ROOT)/external/emscripten/emcc CXX := EMSCRIPTEN=$(EMSCRIPTEN_ROOT) $(COCOS_ROOT)/external/emscripten/em++ AR := EMSCRIPTEN=$(EMSCRIPTEN_ROOT) $(COCOS_ROOT)/external/emscripten/emar -CCFLAGS += -MMD -Wall -fPIC -Qunused-arguments -Wno-overloaded-virtual -Qunused-variable -s TOTAL_MEMORY=268435456 -s VERBOSE=1 -U__native_client__ -CXXFLAGS += -MMD -Wall -fPIC -Qunused-arguments -Wno-overloaded-virtual -Qunused-variable -s TOTAL_MEMORY=268435456 -s VERBOSE=1 -U__native_client__ -std=c++11 +CCFLAGS += -MMD -Wall -fPIC -Qunused-arguments -Wno-overloaded-virtual -Qunused-variable -s TOTAL_MEMORY=268435456 -s VERBOSE=1 -U__native_client__ -Wno-deprecated-declarations +CXXFLAGS += -MMD -Wall -fPIC -Qunused-arguments -Wno-overloaded-virtual -Qunused-variable -s TOTAL_MEMORY=268435456 -s VERBOSE=1 -U__native_client__ -std=c++11 -Wno-deprecated-declarations ARFLAGS = cr LIB_DIR = $(COCOS_SRC)/lib/emscripten