From 984ed75b9ade6c0517ac2582a3ce6a1a42707643 Mon Sep 17 00:00:00 2001 From: Sergey Shambir Date: Sat, 1 Jun 2013 23:04:43 +0400 Subject: [PATCH 01/15] Linux: added project part for QtCreator. Allows easily setup cocos2d on Linux in QtCreator IDE. --- CocosDenshion/proj.linux/CocosDenshion.prf | 20 +++++++ cocos2dx/proj.linux/cocos2dx.prf | 33 +++++++++++ cocos2dx/proj.linux/cocos2dx.pri | 64 ++++++++++++++++++++++ extensions/proj.linux/extensions.prf | 20 +++++++ external/Box2D/proj.linux/box2d.prf | 19 +++++++ external/chipmunk/proj.linux/chipmunk.prf | 19 +++++++ 6 files changed, 175 insertions(+) create mode 100644 CocosDenshion/proj.linux/CocosDenshion.prf create mode 100644 cocos2dx/proj.linux/cocos2dx.prf create mode 100644 cocos2dx/proj.linux/cocos2dx.pri create mode 100644 extensions/proj.linux/extensions.prf create mode 100644 external/Box2D/proj.linux/box2d.prf create mode 100644 external/chipmunk/proj.linux/chipmunk.prf diff --git a/CocosDenshion/proj.linux/CocosDenshion.prf b/CocosDenshion/proj.linux/CocosDenshion.prf new file mode 100644 index 0000000000..4c7ec10f0c --- /dev/null +++ b/CocosDenshion/proj.linux/CocosDenshion.prf @@ -0,0 +1,20 @@ +################################################################################ +# Do not include this file in your project: see cocos2dx.pri. +################################################################################ + +linux { + # We will compile extensions on demand using Makefile. + build_CocosDension.name = Build extension static library + build_CocosDension.input = $$PWD/Makefile + build_CocosDension.output = $$CC_LIBRARY_DIR/libcocosdenshion.so + build_CocosDension.target = $$CC_LIBRARY_DIR/libcocosdenshion.so + build_CocosDension.CONFIG = no_link target_predeps + build_CocosDension.commands = cd $$PWD && make $$CC_MAKE_FLAGS + + QMAKE_EXTRA_COMPILERS += build_CocosDension + QMAKE_EXTRA_TARGETS += build_CocosDension + + PRE_TARGETDEPS += $$CC_LIBRARY_DIR/libcocosdenshion.so + LIBS += -lcocosdenshion +} + diff --git a/cocos2dx/proj.linux/cocos2dx.prf b/cocos2dx/proj.linux/cocos2dx.prf new file mode 100644 index 0000000000..c7d39d19c7 --- /dev/null +++ b/cocos2dx/proj.linux/cocos2dx.prf @@ -0,0 +1,33 @@ +################################################################################ +# Do not include this file in your project: see cocos2dx.pri. +################################################################################ + +# (Set variables in global scope). + +linux { + # Variables used when building libraries. + CC_LIBRARY_DIR = $$PWD/../../lib/linux/release + CC_MAKE_FLAGS = -s + CONFIG(debug, debug|release) { + # Override in debug build. + CC_MAKE_FLAGS += DEBUG=1 + CC_LIBRARY_DIR = $$PWD/../../lib/linux/debug + } + contains(COCOS2D_MODULES,box2d) { + CC_MAKE_FLAGS += USE_BOX2D=1 + } + + # We will compile cocos2d shared library on demand using Makefile. + build_cocos2d.name = Build cocos2d shared library + build_cocos2d.input = $$PWD/Makefile + build_cocos2d.output = $$CC_LIBRARY_DIR/libcocos2d.so + build_cocos2d.target = $$CC_LIBRARY_DIR/libcocos2d.so + build_cocos2d.CONFIG = no_link target_predeps + build_cocos2d.commands = cd $$PWD && make $$CC_MAKE_FLAGS ${QMAKE_FILE_IN} + + QMAKE_EXTRA_COMPILERS += build_cocos2d + QMAKE_EXTRA_TARGETS += build_cocos2d + + PRE_TARGETDEPS += $$CC_LIBRARY_DIR/libcocos2d.so + LIBS += -L$$CC_LIBRARY_DIR -lcocos2d -Wl,-rpath,\'$$CC_LIBRARY_DIR\' +} diff --git a/cocos2dx/proj.linux/cocos2dx.pri b/cocos2dx/proj.linux/cocos2dx.pri new file mode 100644 index 0000000000..1b0b2af72a --- /dev/null +++ b/cocos2dx/proj.linux/cocos2dx.pri @@ -0,0 +1,64 @@ + +################################################################################ +# +# If you want enable extra modules, set COCOS2D_MODULES variable before include +# this file, example: +# COCOS2D_MODULES += CocosDenshion +# COCOS2D_MODULES += extensions +# COCOS2D_MODULES += box2d +# or +# COCOS2D_MODULES += chipmunk +# note: you cannot include both box2d and chipmunk. +# +################################################################################ + +INCLUDEPATH += $$PWD/../ +INCLUDEPATH += $$PWD/../cocoa/ +INCLUDEPATH += $$PWD/../include/ +INCLUDEPATH += $$PWD/../platform/ +INCLUDEPATH += $$PWD/../kazmath/include + +*-msvc* { + # Use equivalents of -Wno-overloaded-virtual -Wno-unused-parameter. + QMAKE_CXXFLAGS_WARN_ON += /wd4263 /wd4100 +} else { + QMAKE_CXXFLAGS_WARN_ON += -Wno-ignored-qualifiers -Wno-overloaded-virtual -Wno-unused-parameter +} + +include($$PWD/cocos2dx.prf) + +linux { + DEFINES += LINUX + INCLUDEPATH += $$PWD/../platform/linux + LIBS += -lpthread +} + +contains(COCOS2D_MODULES,CocosDenshion) { + INCLUDEPATH += $$PWD/../../CocosDenshion/include + include($$PWD/../../CocosDenshion/proj.linux/CocosDenshion.prf) +} + +contains(COCOS2D_MODULES,extensions) { + INCLUDEPATH += $$PWD/../../extensions + LIBS += -lcurl + include($$PWD/../../extensions/proj.linux/extensions.prf) +} + +contains(COCOS2D_MODULES,box2d) { + INCLUDEPATH += $$PWD/../../external + include($$PWD/../../external/Box2D/proj.linux/box2d.prf) +} + +contains(COCOS2D_MODULES,chipmunk) { + contains(COCOS2D_MODULES,box2d):error("COCOS2D_MODULES cannot contain both box2d and chipmunk: choose one and remove another.") + + INCLUDEPATH += $$PWD/../../external/chipmunk/include/chipmunk + include($$PWD/../../external/chipmunk/proj.linux/chipmunk.prf) +} + +CONFIG(debug, debug|release) { + DEFINES += COCOS2D_DEBUG=1 +} +else { + DEFINES += COCOS2D_DEBUG=0 +} diff --git a/extensions/proj.linux/extensions.prf b/extensions/proj.linux/extensions.prf new file mode 100644 index 0000000000..d399b91272 --- /dev/null +++ b/extensions/proj.linux/extensions.prf @@ -0,0 +1,20 @@ +################################################################################ +# Do not include this file in your project: see cocos2dx.pri. +################################################################################ + +linux { + # We will compile extensions on demand using Makefile. + build_extension.name = Build extension static library + build_extension.input = $$PWD/Makefile + build_extension.output = $$CC_LIBRARY_DIR/libextension.a + build_extension.target = $$CC_LIBRARY_DIR/libextension.a + build_extension.CONFIG = no_link target_predeps + build_extension.commands = cd $$PWD && make $$CC_MAKE_FLAGS + + QMAKE_EXTRA_COMPILERS += build_extension + QMAKE_EXTRA_TARGETS += build_extension + + PRE_TARGETDEPS += $$CC_LIBRARY_DIR/libextension.a + LIBS += -Wl,-Bstatic -lextension -Wl,-Bdynamic +} + diff --git a/external/Box2D/proj.linux/box2d.prf b/external/Box2D/proj.linux/box2d.prf new file mode 100644 index 0000000000..434ad88406 --- /dev/null +++ b/external/Box2D/proj.linux/box2d.prf @@ -0,0 +1,19 @@ +################################################################################ +# Do not include this file in your project: see cocos2dx.pri. +################################################################################ + +linux { + # We will compile box2d on demand using Makefile. + build_box2d.name = Build box2d static library + build_box2d.input = $$PWD/Makefile + build_box2d.output = $$CC_LIBRARY_DIR/libbox2d.a + build_box2d.target = $$CC_LIBRARY_DIR/libbox2d.a + build_box2d.CONFIG = no_link target_predeps + build_box2d.commands = cd $$PWD && make $$CC_MAKE_FLAGS + + QMAKE_EXTRA_COMPILERS += build_box2d + QMAKE_EXTRA_TARGETS += build_box2d + + PRE_TARGETDEPS += $$CC_LIBRARY_DIR/libbox2d.a + LIBS += -Wl,-Bstatic -lbox2d -Wl,-Bdynamic +} diff --git a/external/chipmunk/proj.linux/chipmunk.prf b/external/chipmunk/proj.linux/chipmunk.prf new file mode 100644 index 0000000000..a807b0ab99 --- /dev/null +++ b/external/chipmunk/proj.linux/chipmunk.prf @@ -0,0 +1,19 @@ +################################################################################ +# Do not include this file in your project: see cocos2dx.pri. +################################################################################ + +linux { + # We will compile chipmunk on demand using Makefile. + build_chipmunk.name = Build chipmunk static library + build_chipmunk.input = $$PWD/Makefile + build_chipmunk.output = $$CC_LIBRARY_DIR/libchipmunk.a + build_chipmunk.target = $$CC_LIBRARY_DIR/libchipmunk.a + build_chipmunk.CONFIG = no_link target_predeps + build_chipmunk.commands = cd $$PWD && make $$CC_MAKE_FLAGS + + QMAKE_EXTRA_COMPILERS += build_chipmunk + QMAKE_EXTRA_TARGETS += build_chipmunk + + PRE_TARGETDEPS += $$CC_LIBRARY_DIR/libchipmunk.a + LIBS += -Wl,-Bstatic -lchipmunk -Wl,-Bdynamic +} From f5b9b4580cf9ebc08d351d0d3d6dc1f00755f9e6 Mon Sep 17 00:00:00 2001 From: Sergey Shambir Date: Mon, 3 Jun 2013 09:10:34 +0400 Subject: [PATCH 02/15] Enabled c++0x flag, use OpenAL audio backend by default. --- cocos2dx/proj.linux/cocos2dx.prf | 8 ++++++-- cocos2dx/proj.linux/cocos2dx.pri | 8 +++++++- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/cocos2dx/proj.linux/cocos2dx.prf b/cocos2dx/proj.linux/cocos2dx.prf index c7d39d19c7..1122180b53 100644 --- a/cocos2dx/proj.linux/cocos2dx.prf +++ b/cocos2dx/proj.linux/cocos2dx.prf @@ -2,9 +2,10 @@ # Do not include this file in your project: see cocos2dx.pri. ################################################################################ -# (Set variables in global scope). - linux { + # Use OpenAL in default QtCreator project. + isEmpty(COCOS2D_USE_FMOD):COCOS2D_USE_FMOD=0 + # Variables used when building libraries. CC_LIBRARY_DIR = $$PWD/../../lib/linux/release CC_MAKE_FLAGS = -s @@ -16,6 +17,9 @@ linux { contains(COCOS2D_MODULES,box2d) { CC_MAKE_FLAGS += USE_BOX2D=1 } + !equals(COCOS2D_USE_FMOD, 1) { + CC_MAKE_FLAGS += OPENAL=1 + } # We will compile cocos2d shared library on demand using Makefile. build_cocos2d.name = Build cocos2d shared library diff --git a/cocos2dx/proj.linux/cocos2dx.pri b/cocos2dx/proj.linux/cocos2dx.pri index 1b0b2af72a..84bbb6d987 100644 --- a/cocos2dx/proj.linux/cocos2dx.pri +++ b/cocos2dx/proj.linux/cocos2dx.pri @@ -10,6 +10,11 @@ # COCOS2D_MODULES += chipmunk # note: you cannot include both box2d and chipmunk. # +# By default, QtCreator project will use OpenAL audio backend (because FMOD is +# free only for non-commercial use). If you are legal FMOD user, set variable +# COCOS2D_USE_FMOD to use FMOD audio backend: +# COCOS2D_USE_FMOD = 1 +# ################################################################################ INCLUDEPATH += $$PWD/../ @@ -22,7 +27,8 @@ INCLUDEPATH += $$PWD/../kazmath/include # Use equivalents of -Wno-overloaded-virtual -Wno-unused-parameter. QMAKE_CXXFLAGS_WARN_ON += /wd4263 /wd4100 } else { - QMAKE_CXXFLAGS_WARN_ON += -Wno-ignored-qualifiers -Wno-overloaded-virtual -Wno-unused-parameter + QMAKE_CXXFLAGS_WARN_ON += -Wno-ignored-qualifiers -Wno-overloaded-virtual -Wno-unused-parameter -Wno-unused-function + QMAKE_CXXFLAGS += -std=c++0x } include($$PWD/cocos2dx.prf) From 3b058fe01941a92b7f72347155922d43484edaff Mon Sep 17 00:00:00 2001 From: samuele3hu Date: Tue, 25 Jun 2013 14:55:57 +0800 Subject: [PATCH 03/15] issue #2276: Add OpenGL lua module --- .../luaScript/OpenGLTest/OpenGLTest.lua | 399 ++-- .../project.pbxproj.REMOVED.git-id | 2 +- .../LuaOpengl.cpp.REMOVED.git-id | 2 +- scripting/lua/script/Opengl.lua | 299 +++ scripting/lua/script/OpenglConstants.lua | 1658 ++++++++--------- 5 files changed, 1323 insertions(+), 1037 deletions(-) create mode 100644 scripting/lua/script/Opengl.lua diff --git a/samples/Lua/TestLua/Resources/luaScript/OpenGLTest/OpenGLTest.lua b/samples/Lua/TestLua/Resources/luaScript/OpenGLTest/OpenGLTest.lua index 4465502339..ec77bb972f 100644 --- a/samples/Lua/TestLua/Resources/luaScript/OpenGLTest/OpenGLTest.lua +++ b/samples/Lua/TestLua/Resources/luaScript/OpenGLTest/OpenGLTest.lua @@ -1,5 +1,6 @@ require "OpenglConstants" require "Cocos2dConstants" +require "Opengl" local function OpenGLTestMainLayer() local kItemTagBasic = 1000 local testCount = 16 @@ -190,19 +191,19 @@ local function OpenGLTestMainLayer() local program = shader:getProgram() - local glNode = GLNode:create() + local glNode = gl.glNodeCreate() glNode:setContentSize(CCSizeMake(256,256)) glNode:setAnchorPoint(ccp(0.5, 0.5)) - uniformCenter = glNode:_getUniformLocation(program,"center") - uniformResolution = glNode:_getUniformLocation( program, "resolution") + uniformCenter = gl.getUniformLocation(program,"center") + uniformResolution = gl.getUniformLocation( program, "resolution") glNode:setShaderProgram(shader) local function initBuffer() - squareVertexPositionBuffer.buffer_id = glNode:_createBuffer() - glNode:_bindBuffer(GLConstant.ARRAY_BUFFER,squareVertexPositionBuffer.buffer_id) + squareVertexPositionBuffer = gl.createBuffer() + gl.bindBuffer(gl.ARRAY_BUFFER,squareVertexPositionBuffer) local vertices = { 256,256,0,256,256,0,0,0} - glNode:bufferData(GLConstant.ARRAY_BUFFER,8,vertices,GLConstant.STATIC_DRAW) - glNode:_bindBuffer(GLConstant.ARRAY_BUFFER, 0) + gl.bufferData(gl.ARRAY_BUFFER,8,vertices,gl.STATIC_DRAW) + gl.bindBuffer(gl.ARRAY_BUFFER, 0) end local function updateMajori(fTime) @@ -217,13 +218,13 @@ local function OpenGLTestMainLayer() shader:setUniformLocationWith2f( uniformCenter, size.width/2, size.height/2) shader:setUniformLocationWith2f( uniformResolution, 256, 256) - glNode:glEnableVertexAttribs(CCConstants.VERTEX_ATTRIB_FLAG_POSITION) + gl.glEnableVertexAttribs(CCConstants.VERTEX_ATTRIB_FLAG_POSITION) --Draw fullscreen Square - glNode:_bindBuffer(GLConstant.ARRAY_BUFFER,squareVertexPositionBuffer.buffer_id) - glNode:vertexAttribPointer(CCConstants.VERTEX_ATTRIB_POSITION, 2, GLConstant.FLOAT, false, 0, 0) - glNode:drawArrays(GLConstant.TRIANGLE_STRIP,0,4) - glNode:_bindBuffer(GLConstant.ARRAY_BUFFER,0) + gl.bindBuffer(gl.ARRAY_BUFFER,squareVertexPositionBuffer) + gl.vertexAttribPointer(CCConstants.VERTEX_ATTRIB_POSITION, 2, gl.FLOAT, false, 0, 0) + gl.drawArrays(gl.TRIANGLE_STRIP,0,4) + gl.bindBuffer(gl.ARRAY_BUFFER,0) end end initBuffer() @@ -252,19 +253,19 @@ local function OpenGLTestMainLayer() local program = shader:getProgram() - local glNode = GLNode:create() + local glNode = gl.glNodeCreate() glNode:setContentSize(CCSizeMake(256,256)) glNode:setAnchorPoint(ccp(0.5, 0.5)) - uniformCenter = glNode:_getUniformLocation(program,"center") - uniformResolution = glNode:_getUniformLocation( program, "resolution") + uniformCenter = gl.getUniformLocation(program,"center") + uniformResolution = gl.getUniformLocation( program, "resolution") glNode:setShaderProgram(shader) local function initBuffer() - squareVertexPositionBuffer.buffer_id = glNode:_createBuffer() - glNode:_bindBuffer(GLConstant.ARRAY_BUFFER,squareVertexPositionBuffer.buffer_id) + squareVertexPositionBuffer.buffer_id = gl.createBuffer() + gl.bindBuffer(gl.ARRAY_BUFFER,squareVertexPositionBuffer.buffer_id) local vertices = { 256,256,0,256,256,0,0,0} - glNode:bufferData(GLConstant.ARRAY_BUFFER,8,vertices,GLConstant.STATIC_DRAW) - glNode:_bindBuffer(GLConstant.ARRAY_BUFFER, 0) + gl.bufferData(gl.ARRAY_BUFFER,8,vertices,gl.STATIC_DRAW) + gl.bindBuffer(gl.ARRAY_BUFFER, 0) end local function updateMandelbrot(fTime) @@ -279,13 +280,13 @@ local function OpenGLTestMainLayer() shader:setUniformLocationWith2f( uniformCenter, size.width/2, size.height/2) shader:setUniformLocationWith2f( uniformResolution, 256, 256) - glNode:glEnableVertexAttribs(0x1) + gl.glEnableVertexAttribs(0x1) --Draw fullscreen Square - glNode:_bindBuffer(GLConstant.ARRAY_BUFFER,squareVertexPositionBuffer.buffer_id) - glNode:vertexAttribPointer(CCConstants.VERTEX_ATTRIB_POSITION, 2, GLConstant.FLOAT, false, 0, 0) - glNode:drawArrays(GLConstant.TRIANGLE_STRIP,0,4) - glNode:_bindBuffer(GLConstant.ARRAY_BUFFER,0) + gl.bindBuffer(gl.ARRAY_BUFFER,squareVertexPositionBuffer.buffer_id) + gl.vertexAttribPointer(CCConstants.VERTEX_ATTRIB_POSITION, 2, gl.FLOAT, false, 0, 0) + gl.drawArrays(gl.TRIANGLE_STRIP,0,4) + gl.bindBuffer(gl.ARRAY_BUFFER,0) end end initBuffer() @@ -314,19 +315,19 @@ local function OpenGLTestMainLayer() local program = shader:getProgram() - local glNode = GLNode:create() + local glNode = gl.glNodeCreate() glNode:setContentSize(CCSizeMake(256,256)) glNode:setAnchorPoint(ccp(0.5, 0.5)) - uniformCenter = glNode:_getUniformLocation(program,"center") - uniformResolution = glNode:_getUniformLocation( program, "resolution") + uniformCenter = gl.getUniformLocation(program,"center") + uniformResolution = gl.getUniformLocation( program, "resolution") glNode:setShaderProgram(shader) local function initBuffer() - squareVertexPositionBuffer.buffer_id = glNode:_createBuffer() - glNode:_bindBuffer(GLConstant.ARRAY_BUFFER,squareVertexPositionBuffer.buffer_id) + squareVertexPositionBuffer.buffer_id = gl.createBuffer() + gl.bindBuffer(gl.ARRAY_BUFFER,squareVertexPositionBuffer.buffer_id) local vertices = { 256,256,0,256,256,0,0,0} - glNode:bufferData(GLConstant.ARRAY_BUFFER,8,vertices,GLConstant.STATIC_DRAW) - glNode:_bindBuffer(GLConstant.ARRAY_BUFFER, 0) + gl.bufferData(gl.ARRAY_BUFFER,8,vertices,gl.STATIC_DRAW) + gl.bindBuffer(gl.ARRAY_BUFFER, 0) end local function updateHeart(fTime) @@ -341,13 +342,13 @@ local function OpenGLTestMainLayer() shader:setUniformLocationWith2f( uniformCenter, size.width/2, size.height/2) shader:setUniformLocationWith2f( uniformResolution, 256, 256) - glNode:glEnableVertexAttribs(0x1) + gl.glEnableVertexAttribs(0x1) --Draw fullscreen Square - glNode:_bindBuffer(GLConstant.ARRAY_BUFFER,squareVertexPositionBuffer.buffer_id) - glNode:vertexAttribPointer(CCConstants.VERTEX_ATTRIB_POSITION, 2, GLConstant.FLOAT, false, 0, 0) - glNode:drawArrays(GLConstant.TRIANGLE_STRIP,0,4) - glNode:_bindBuffer(GLConstant.ARRAY_BUFFER,0) + gl.bindBuffer(gl.ARRAY_BUFFER,squareVertexPositionBuffer.buffer_id) + gl.vertexAttribPointer(CCConstants.VERTEX_ATTRIB_POSITION, 2, gl.FLOAT, false, 0, 0) + gl.drawArrays(gl.TRIANGLE_STRIP,0,4) + gl.bindBuffer(gl.ARRAY_BUFFER,0) end end initBuffer() @@ -376,19 +377,19 @@ local function OpenGLTestMainLayer() local program = shader:getProgram() - local glNode = GLNode:create() + local glNode = gl.glNodeCreate() glNode:setContentSize(CCSizeMake(256,256)) glNode:setAnchorPoint(ccp(0.5, 0.5)) - uniformCenter = glNode:_getUniformLocation(program,"center") - uniformResolution = glNode:_getUniformLocation( program, "resolution") + uniformCenter = gl.getUniformLocation(program,"center") + uniformResolution = gl.getUniformLocation( program, "resolution") glNode:setShaderProgram(shader) local function initBuffer() - squareVertexPositionBuffer.buffer_id = glNode:_createBuffer() - glNode:_bindBuffer(GLConstant.ARRAY_BUFFER,squareVertexPositionBuffer.buffer_id) + squareVertexPositionBuffer.buffer_id = gl.createBuffer() + gl.bindBuffer(gl.ARRAY_BUFFER,squareVertexPositionBuffer.buffer_id) local vertices = { 256,256,0,256,256,0,0,0} - glNode:bufferData(GLConstant.ARRAY_BUFFER,8,vertices,GLConstant.STATIC_DRAW) - glNode:_bindBuffer(GLConstant.ARRAY_BUFFER, 0) + gl.bufferData(gl.ARRAY_BUFFER,8,vertices,gl.STATIC_DRAW) + gl.bindBuffer(gl.ARRAY_BUFFER, 0) end local function updatePlasma(fTime) @@ -403,13 +404,13 @@ local function OpenGLTestMainLayer() shader:setUniformLocationWith2f( uniformCenter, size.width/2, size.height/2) shader:setUniformLocationWith2f( uniformResolution, 256, 256) - glNode:glEnableVertexAttribs(0x1) + gl.glEnableVertexAttribs(0x1) --Draw fullscreen Square - glNode:_bindBuffer(GLConstant.ARRAY_BUFFER,squareVertexPositionBuffer.buffer_id) - glNode:vertexAttribPointer(CCConstants.VERTEX_ATTRIB_POSITION, 2, GLConstant.FLOAT, false, 0, 0) - glNode:drawArrays(GLConstant.TRIANGLE_STRIP,0,4) - glNode:_bindBuffer(GLConstant.ARRAY_BUFFER,0) + gl.bindBuffer(gl.ARRAY_BUFFER,squareVertexPositionBuffer.buffer_id) + gl.vertexAttribPointer(CCConstants.VERTEX_ATTRIB_POSITION, 2, gl.FLOAT, false, 0, 0) + gl.drawArrays(gl.TRIANGLE_STRIP,0,4) + gl.bindBuffer(gl.ARRAY_BUFFER,0) end end initBuffer() @@ -438,19 +439,19 @@ local function OpenGLTestMainLayer() local program = shader:getProgram() - local glNode = GLNode:create() + local glNode = gl.glNodeCreate() glNode:setContentSize(CCSizeMake(256,256)) glNode:setAnchorPoint(ccp(0.5, 0.5)) - uniformCenter = glNode:_getUniformLocation(program,"center") - uniformResolution = glNode:_getUniformLocation( program, "resolution") + uniformCenter = gl.getUniformLocation(program,"center") + uniformResolution = gl.getUniformLocation( program, "resolution") glNode:setShaderProgram(shader) local function initBuffer() - squareVertexPositionBuffer.buffer_id = glNode:_createBuffer() - glNode:_bindBuffer(GLConstant.ARRAY_BUFFER,squareVertexPositionBuffer.buffer_id) + squareVertexPositionBuffer.buffer_id = gl.createBuffer() + gl.bindBuffer(gl.ARRAY_BUFFER,squareVertexPositionBuffer.buffer_id) local vertices = { 256,256,0,256,256,0,0,0} - glNode:bufferData(GLConstant.ARRAY_BUFFER,8,vertices,GLConstant.STATIC_DRAW) - glNode:_bindBuffer(GLConstant.ARRAY_BUFFER, 0) + gl.bufferData(gl.ARRAY_BUFFER,8,vertices,gl.STATIC_DRAW) + gl.bindBuffer(gl.ARRAY_BUFFER, 0) end local function updateFlower(fTime) @@ -465,13 +466,13 @@ local function OpenGLTestMainLayer() shader:setUniformLocationWith2f( uniformCenter, size.width/2, size.height/2) shader:setUniformLocationWith2f( uniformResolution, 256, 256) - glNode:glEnableVertexAttribs(0x1) + gl.glEnableVertexAttribs(0x1) --Draw fullscreen Square - glNode:_bindBuffer(GLConstant.ARRAY_BUFFER,squareVertexPositionBuffer.buffer_id) - glNode:vertexAttribPointer(CCConstants.VERTEX_ATTRIB_POSITION, 2, GLConstant.FLOAT, false, 0, 0) - glNode:drawArrays(GLConstant.TRIANGLE_STRIP,0,4) - glNode:_bindBuffer(GLConstant.ARRAY_BUFFER,0) + gl.bindBuffer(gl.ARRAY_BUFFER,squareVertexPositionBuffer.buffer_id) + gl.vertexAttribPointer(CCConstants.VERTEX_ATTRIB_POSITION, 2, gl.FLOAT, false, 0, 0) + gl.drawArrays(gl.TRIANGLE_STRIP,0,4) + gl.bindBuffer(gl.ARRAY_BUFFER,0) end end initBuffer() @@ -500,19 +501,19 @@ local function OpenGLTestMainLayer() local program = shader:getProgram() - local glNode = GLNode:create() + local glNode = gl.glNodeCreate() glNode:setContentSize(CCSizeMake(256,256)) glNode:setAnchorPoint(ccp(0.5, 0.5)) - uniformCenter = glNode:_getUniformLocation(program,"center") - uniformResolution = glNode:_getUniformLocation( program, "resolution") + uniformCenter = gl.getUniformLocation(program,"center") + uniformResolution = gl.getUniformLocation( program, "resolution") glNode:setShaderProgram(shader) local function initBuffer() - squareVertexPositionBuffer.buffer_id = glNode:_createBuffer() - glNode:_bindBuffer(GLConstant.ARRAY_BUFFER,squareVertexPositionBuffer.buffer_id) + squareVertexPositionBuffer.buffer_id = gl.createBuffer() + gl.bindBuffer(gl.ARRAY_BUFFER,squareVertexPositionBuffer.buffer_id) local vertices = { 256,256,0,256,256,0,0,0} - glNode:bufferData(GLConstant.ARRAY_BUFFER,8,vertices,GLConstant.STATIC_DRAW) - glNode:_bindBuffer(GLConstant.ARRAY_BUFFER, 0) + gl.bufferData(gl.ARRAY_BUFFER,8,vertices,gl.STATIC_DRAW) + gl.bindBuffer(gl.ARRAY_BUFFER, 0) end local function updateJulia(fTime) @@ -527,13 +528,13 @@ local function OpenGLTestMainLayer() shader:setUniformLocationWith2f( uniformCenter, size.width/2, size.height/2) shader:setUniformLocationWith2f( uniformResolution, 256, 256) - glNode:glEnableVertexAttribs(0x1) + gl.glEnableVertexAttribs(0x1) --Draw fullscreen Square - glNode:_bindBuffer(GLConstant.ARRAY_BUFFER,squareVertexPositionBuffer.buffer_id) - glNode:vertexAttribPointer(CCConstants.VERTEX_ATTRIB_POSITION, 2, GLConstant.FLOAT, false, 0, 0) - glNode:drawArrays(GLConstant.TRIANGLE_STRIP,0,4) - glNode:_bindBuffer(GLConstant.ARRAY_BUFFER,0) + gl.bindBuffer(gl.ARRAY_BUFFER,squareVertexPositionBuffer.buffer_id) + gl.vertexAttribPointer(CCConstants.VERTEX_ATTRIB_POSITION, 2, gl.FLOAT, false, 0, 0) + gl.drawArrays(gl.TRIANGLE_STRIP,0,4) + gl.bindBuffer(gl.ARRAY_BUFFER,0) end end initBuffer() @@ -551,7 +552,7 @@ local function OpenGLTestMainLayer() local sprite = CCSprite:create("Images/grossini.png") sprite:setPosition( size.width/2, size.height/2) glGetActiveLayer:addChild(sprite) - local glNode = GLNode:create() + local glNode = gl.glNodeCreate() glGetActiveLayer:addChild(glNode,-10) local scheduler = CCDirector:sharedDirector():getScheduler() @@ -560,13 +561,13 @@ local function OpenGLTestMainLayer() local glProgam = tolua.cast(sprite:getShaderProgram(),"CCGLProgram") if nil ~= glProgam then local p = glProgam:getProgram() - local aaSize,aaType,aaName = glNode:_getActiveAttrib(p,0) + local aaSize,aaType,aaName = gl.getActiveAttrib(p,0) local strFmt = "size:"..aaSize.." type:"..aaType.." name:"..aaName print(strFmt) - local auSize,auType,auName = glNode:_getActiveUniform(p,0) + local auSize,auType,auName = gl.getActiveUniform(p,0) strFmt = "size:"..auSize.." type:"..auType.." name:"..auName print(strFmt) - local shadersTable = glNode:_getAttachedShaders(p) + local shadersTable = gl.getAttachedShaders(p) if type(shadersTable) == "table" then local count = table.getn(shadersTable) local i = 1 @@ -598,7 +599,7 @@ local function OpenGLTestMainLayer() local squareVertexTextureBuffer = {} local texImage2dLayer = CCLayer:create() InitTitle(texImage2dLayer) - local glNode = GLNode:create() + local glNode = gl.glNodeCreate() texImage2dLayer:addChild(glNode, 10) glNode:setPosition(size.width/2, size.height/2) glNode:setContentSize(CCSizeMake(128,128)) @@ -606,8 +607,8 @@ local function OpenGLTestMainLayer() local shaderCache = CCShaderCache:getInstance() local shader = shaderCache:getProgram("ShaderPositionTexture") local function initGL() - texture.texture_id = glNode:_createTexture() - glNode:_bindTexture(GLConstant.TEXTURE_2D,texture.texture_id ) + texture.texture_id = gl.createTexture() + gl.bindTexture(gl.TEXTURE_2D,texture.texture_id ) local pixels = {} local i = 1 while i <= 4096 do @@ -621,22 +622,22 @@ local function OpenGLTestMainLayer() i = i + 1 end - glNode:_texImage2D(GLConstant.TEXTURE_2D, 0, GLConstant.RGBA, 32, 32, 0, GLConstant.RGBA, GLConstant.UNSIGNED_BYTE, table.getn(pixels),pixels) - glNode:texParameteri(GLConstant.TEXTURE_2D, GLConstant.TEXTURE_MAG_FILTER, GLConstant.NEAREST) - glNode:texParameteri(GLConstant.TEXTURE_2D, GLConstant.TEXTURE_MIN_FILTER, GLConstant.NEAREST) - glNode:_bindTexture(GLConstant.TEXTURE_2D, 0) + gl._texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 32, 32, 0, gl.RGBA, gl.UNSIGNED_BYTE, table.getn(pixels),pixels) + gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST) + gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST) + gl.bindTexture(gl.TEXTURE_2D, 0) --Square - squareVertexPositionBuffer.buffer_id = glNode:_createBuffer() - glNode:_bindBuffer(GLConstant.ARRAY_BUFFER, squareVertexPositionBuffer.buffer_id) + squareVertexPositionBuffer.buffer_id = gl.createBuffer() + gl.bindBuffer(gl.ARRAY_BUFFER, squareVertexPositionBuffer.buffer_id) local vertices = { 128, 128, 0, 128, 128, 0, 0, 0 } - glNode:bufferData(GLConstant.ARRAY_BUFFER,table.getn(vertices),vertices,GLConstant.STATIC_DRAW) + gl.bufferData(gl.ARRAY_BUFFER,table.getn(vertices),vertices,gl.STATIC_DRAW) - squareVertexTextureBuffer.buffer_id = glNode:_createBuffer() - glNode:_bindBuffer(GLConstant.ARRAY_BUFFER, squareVertexTextureBuffer.buffer_id) + squareVertexTextureBuffer.buffer_id = gl.createBuffer() + gl.bindBuffer(gl.ARRAY_BUFFER, squareVertexTextureBuffer.buffer_id) local texcoords = { 1, 1, 0, 1, 1, 0, 0, 0 } - glNode:bufferData(GLConstant.ARRAY_BUFFER,table.getn(texcoords),texcoords,GLConstant.STATIC_DRAW) - glNode:_bindBuffer(GLConstant.ARRAY_BUFFER,0) + gl.bufferData(gl.ARRAY_BUFFER,table.getn(texcoords),texcoords,gl.STATIC_DRAW) + gl.bindBuffer(gl.ARRAY_BUFFER,0) end local function TexImage2DDraw() @@ -644,20 +645,20 @@ local function OpenGLTestMainLayer() shader:use() shader:setUniformsForBuiltins() - glNode:_bindTexture(GLConstant.TEXTURE_2D, texture.texture_id) - glNode:glEnableVertexAttribs(CCConstants.VERTEX_ATTRIB_FLAG_TEX_COORDS or CCConstants.VERTEX_ATTRIB_FLAG_POSITION) + gl.bindTexture(gl.TEXTURE_2D, texture.texture_id) + gl.glEnableVertexAttribs(CCConstants.VERTEX_ATTRIB_FLAG_TEX_COORDS or CCConstants.VERTEX_ATTRIB_FLAG_POSITION) - glNode:_bindBuffer(GLConstant.ARRAY_BUFFER, squareVertexPositionBuffer.buffer_id) - glNode:vertexAttribPointer(CCConstants.VERTEX_ATTRIB_POSITION,2,GLConstant.FLOAT,false,0,0) + gl.bindBuffer(gl.ARRAY_BUFFER, squareVertexPositionBuffer.buffer_id) + gl.vertexAttribPointer(CCConstants.VERTEX_ATTRIB_POSITION,2,gl.FLOAT,false,0,0) - glNode:_bindBuffer(GLConstant.ARRAY_BUFFER, squareVertexTextureBuffer.buffer_id) - glNode:vertexAttribPointer(CCConstants.VERTEX_ATTRIB_TEX_COORDS,2,GLConstant.FLOAT,false,0,0) + gl.bindBuffer(gl.ARRAY_BUFFER, squareVertexTextureBuffer.buffer_id) + gl.vertexAttribPointer(CCConstants.VERTEX_ATTRIB_TEX_COORDS,2,gl.FLOAT,false,0,0) - glNode:drawArrays(GLConstant.TRIANGLE_STRIP,0,4) + gl.drawArrays(gl.TRIANGLE_STRIP,0,4) - glNode:_bindTexture(GLConstant.TEXTURE_2D,0) - glNode:_bindBuffer(GLConstant.ARRAY_BUFFER,0) + gl.bindTexture(gl.TEXTURE_2D,0) + gl.bindBuffer(gl.ARRAY_BUFFER,0) end end @@ -669,9 +670,9 @@ local function OpenGLTestMainLayer() local function CreateSupportedExtensionsLayer() local extensionsLayer = CCLayer:create() InitTitle(extensionsLayer) - local glNode = GLNode:create() + local glNode = gl.glNodeCreate() extensionsLayer:addChild(glNode,-10) - local supportExtensions = glNode:getSupportedExtensions() + local supportExtensions = gl.getSupportedExtensions() if type(supportExtensions) ~= "table" then print("error:return value not table") return @@ -688,7 +689,7 @@ local function OpenGLTestMainLayer() local function CreateReadPixelsTest() local readPixelsLayer = CCLayer:create() InitTitle(readPixelsLayer) - local glNode = GLNode:create() + local glNode = gl.glNodeCreate() readPixelsLayer:addChild(glNode,-10) local x = size.width @@ -726,7 +727,7 @@ local function OpenGLTestMainLayer() local i = 1 local strFmt = "" --blue - local bPixels = glNode:readPixels(0, 0, 1, 1, GLConstant.RGBA, GLConstant.UNSIGNED_BYTE, pixelCount) + local bPixels = gl.readPixels(0, 0, 1, 1, gl.RGBA, gl.UNSIGNED_BYTE, pixelCount) for i=1,pixelCount do local strTmp = string.format("%d:%d ",i,bPixels[i]) strFmt = strFmt .. strTmp @@ -734,7 +735,7 @@ local function OpenGLTestMainLayer() print(strFmt) strFmt = "" --red - local rPixels = glNode:readPixels(x-1, 0, 1, 1, GLConstant.RGBA, GLConstant.UNSIGNED_BYTE, pixelCount) + local rPixels = gl.readPixels(x-1, 0, 1, 1, gl.RGBA, gl.UNSIGNED_BYTE, pixelCount) for i=1,pixelCount do local strTmp = string.format("%d:%d ",i,rPixels[i]) strFmt = strFmt .. strTmp @@ -742,7 +743,7 @@ local function OpenGLTestMainLayer() print(strFmt) strFmt = "" --green - local gPixels = glNode:readPixels(0, y-1, 1, 1, GLConstant.RGBA, GLConstant.UNSIGNED_BYTE, pixelCount) + local gPixels = gl.readPixels(0, y-1, 1, 1, gl.RGBA, gl.UNSIGNED_BYTE, pixelCount) for i=1,pixelCount do local strTmp = string.format("%d:%d ",i,gPixels[i]) strFmt = strFmt .. strTmp @@ -750,7 +751,7 @@ local function OpenGLTestMainLayer() print(strFmt) strFmt = "" --white - local wPixels = glNode:readPixels(x-1, y-1, 1, 1, GLConstant.RGBA, GLConstant.UNSIGNED_BYTE, pixelCount) + local wPixels = gl.readPixels(x-1, y-1, 1, 1, gl.RGBA, gl.UNSIGNED_BYTE, pixelCount) for i=1,pixelCount do local strTmp = string.format("%d:%d ",i,wPixels[i]) strFmt = strFmt .. strTmp @@ -778,18 +779,18 @@ local function OpenGLTestMainLayer() local blue = CCLayerColor:create(ccc4(0, 0, 255, 255)) clearLayer:addChild( blue, 1 ) - local glNode = GLNode:create() + local glNode = gl.glNodeCreate() clearLayer:addChild(glNode,10) - --glNode:init() + --gl.init() local scheduler = CCDirector:sharedDirector():getScheduler() local function clearDraw() - glNode:clear(GLConstant.COLOR_BUFFER_BIT) + gl.clear(gl.COLOR_BUFFER_BIT) end local function getCurrentResult() - local pixels = glNode:readPixels(math.floor(size.width/2), math.floor(size.height/2), 1, 1, GLConstant.RGBA, GLConstant.UNSIGNED_BYTE, 4) + local pixels = gl.readPixels(math.floor(size.width/2), math.floor(size.height/2), 1, 1, gl.RGBA, gl.UNSIGNED_BYTE, 4) local strFmt = "" for i=1,4 do local strTmp = string.format("%d:%d ",i,pixels[i]) @@ -814,7 +815,7 @@ local function OpenGLTestMainLayer() local function createNodeWebGLAPITest() local nodeWebGLAPILayer = CCLayer:create() InitTitle(nodeWebGLAPILayer) - local glNode = GLNode:create() + local glNode = gl.glNodeCreate() nodeWebGLAPILayer:addChild(glNode,10) local shaderProgram = {} local triangleVertexPositionBuffer = {} @@ -841,13 +842,13 @@ local function OpenGLTestMainLayer() local function compileShader(source,type) local shader if type == "fragment" then - shader = glNode:_createShader(GLConstant.FRAGMENT_SHADER) + shader = gl.createShader(gl.FRAGMENT_SHADER) else - shader = glNode:_createShader(GLConstant.VERTEX_SHADER) + shader = gl.createShader(gl.VERTEX_SHADER) end - glNode:_shaderSource(shader,source) - glNode:_compileShader(shader) - local ret = glNode:_getShaderParameter(shader,GLConstant.COMPILE_STATUS) + gl.shaderSource(shader,source) + gl.compileShader(shader) + local ret = gl.getShaderParameter(shader,gl.COMPILE_STATUS) if not ret then --throw print("Could not compile "..type.." shader") @@ -856,111 +857,111 @@ local function OpenGLTestMainLayer() end local function initBuffers() - triangleVertexPositionBuffer.buffer_id = glNode:_createBuffer() - glNode:_bindBuffer(GLConstant.ARRAY_BUFFER, triangleVertexPositionBuffer.buffer_id) + triangleVertexPositionBuffer.buffer_id = gl.createBuffer() + gl.bindBuffer(gl.ARRAY_BUFFER, triangleVertexPositionBuffer.buffer_id) local vertices = { 0.0, 1.0, 0.0, -1.0, -1.0, 0.0, 1.0, -1.0, 0.0 } - glNode:bufferData(GLConstant.ARRAY_BUFFER, 9, vertices,GLConstant.STATIC_DRAW) + gl.bufferData(gl.ARRAY_BUFFER, 9, vertices,gl.STATIC_DRAW) triangleVertexPositionBuffer.itemSize = 3 triangleVertexPositionBuffer.numItems = 3 - triangleVertexColorBuffer.buffer_id = glNode:_createBuffer() - glNode:_bindBuffer(GLConstant.ARRAY_BUFFER, triangleVertexColorBuffer.buffer_id) + triangleVertexColorBuffer.buffer_id = gl.createBuffer() + gl.bindBuffer(gl.ARRAY_BUFFER, triangleVertexColorBuffer.buffer_id) local colors = { 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0 } - glNode:bufferData(GLConstant.ARRAY_BUFFER, 12, colors , GLConstant.STATIC_DRAW) + gl.bufferData(gl.ARRAY_BUFFER, 12, colors , gl.STATIC_DRAW) triangleVertexColorBuffer.itemSize = 4 triangleVertexColorBuffer.numItems = 3 - squareVertexPositionBuffer.buffer_id = glNode:_createBuffer() - glNode:_bindBuffer(GLConstant.ARRAY_BUFFER, squareVertexPositionBuffer.buffer_id) + squareVertexPositionBuffer.buffer_id = gl.createBuffer() + gl.bindBuffer(gl.ARRAY_BUFFER, squareVertexPositionBuffer.buffer_id) vertices = { 1.0, 1.0, 0.0, -1.0, 1.0, 0.0, 1.0, -1.0, 0.0, -1.0, -1.0, 0.0 } - glNode:bufferData(GLConstant.ARRAY_BUFFER, 12, vertices,GLConstant.STATIC_DRAW) + gl.bufferData(gl.ARRAY_BUFFER, 12, vertices,gl.STATIC_DRAW) squareVertexPositionBuffer.itemSize = 3 squareVertexPositionBuffer.numItems = 4 - squareVertexColorBuffer.buffer_id = glNode:_createBuffer() - glNode:_bindBuffer(GLConstant.ARRAY_BUFFER, squareVertexColorBuffer.buffer_id) + squareVertexColorBuffer.buffer_id = gl.createBuffer() + gl.bindBuffer(gl.ARRAY_BUFFER, squareVertexColorBuffer.buffer_id) colors = { 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0 } - glNode:bufferData(GLConstant.ARRAY_BUFFER, 16,colors, GLConstant.STATIC_DRAW) + gl.bufferData(gl.ARRAY_BUFFER, 16,colors, gl.STATIC_DRAW) squareVertexColorBuffer.itemSize = 4 squareVertexColorBuffer.numItems = 4 - glNode:_bindBuffer(GLConstant.ARRAY_BUFFER, 0) + gl.bindBuffer(gl.ARRAY_BUFFER, 0) end local function setMatrixUniforms() - glNode:uniformMatrix4fv(shaderProgram.pMatrixUniform,false,table.getn(pMatrix), pMatrix) - glNode:uniformMatrix4fv(shaderProgram.mvMatrixUniform,false,table.getn(mvMatrix),mvMatrix) + gl.uniformMatrix4fv(shaderProgram.pMatrixUniform,false,table.getn(pMatrix), pMatrix) + gl.uniformMatrix4fv(shaderProgram.mvMatrixUniform,false,table.getn(mvMatrix),mvMatrix) end local function nodeWebGLDraw() - glNode:_useProgram(shaderProgram.program_id) - glNode:uniformMatrix4fv(shaderProgram.pMatrixUniform,false,table.getn(pMatrix),pMatrix) - glNode:uniformMatrix4fv(shaderProgram.mvMatrixUniform,false,table.getn(mvMatrix),mvMatrix) + gl.useProgram(shaderProgram.program_id) + gl.uniformMatrix4fv(shaderProgram.pMatrixUniform,false,table.getn(pMatrix),pMatrix) + gl.uniformMatrix4fv(shaderProgram.mvMatrixUniform,false,table.getn(mvMatrix),mvMatrix) - glNode:enableVertexAttribArray(shaderProgram.vertexPositionAttribute) - glNode:enableVertexAttribArray(shaderProgram.vertexColorAttribute) + gl.enableVertexAttribArray(shaderProgram.vertexPositionAttribute) + gl.enableVertexAttribArray(shaderProgram.vertexColorAttribute) --Draw - glNode:_bindBuffer(GLConstant.ARRAY_BUFFER, squareVertexPositionBuffer.buffer_id) - glNode:vertexAttribPointer(shaderProgram.vertexPositionAttribute, squareVertexPositionBuffer.itemSize, GLConstant.FLOAT, false, 0, 0) + gl.bindBuffer(gl.ARRAY_BUFFER, squareVertexPositionBuffer.buffer_id) + gl.vertexAttribPointer(shaderProgram.vertexPositionAttribute, squareVertexPositionBuffer.itemSize, gl.FLOAT, false, 0, 0) - glNode:_bindBuffer(GLConstant.ARRAY_BUFFER, squareVertexColorBuffer.buffer_id) - glNode:vertexAttribPointer(shaderProgram.vertexColorAttribute, squareVertexColorBuffer.itemSize, GLConstant.FLOAT, false, 0, 0) + gl.bindBuffer(gl.ARRAY_BUFFER, squareVertexColorBuffer.buffer_id) + gl.vertexAttribPointer(shaderProgram.vertexColorAttribute, squareVertexColorBuffer.itemSize, gl.FLOAT, false, 0, 0) setMatrixUniforms() - glNode:drawArrays(GLConstant.TRIANGLE_STRIP, 0, squareVertexPositionBuffer.numItems) + gl.drawArrays(gl.TRIANGLE_STRIP, 0, squareVertexPositionBuffer.numItems) --DrawArray - glNode:_bindBuffer(GLConstant.ARRAY_BUFFER, triangleVertexPositionBuffer.buffer_id) - glNode:vertexAttribPointer(shaderProgram.vertexPositionAttribute, triangleVertexPositionBuffer.itemSize, GLConstant.FLOAT, false, 0, 0) + gl.bindBuffer(gl.ARRAY_BUFFER, triangleVertexPositionBuffer.buffer_id) + gl.vertexAttribPointer(shaderProgram.vertexPositionAttribute, triangleVertexPositionBuffer.itemSize, gl.FLOAT, false, 0, 0) - glNode:_bindBuffer(GLConstant.ARRAY_BUFFER, triangleVertexColorBuffer.buffer_id) - glNode:vertexAttribPointer(shaderProgram.vertexColorAttribute, triangleVertexColorBuffer.itemSize, GLConstant.FLOAT, false, 0, 0) + gl.bindBuffer(gl.ARRAY_BUFFER, triangleVertexColorBuffer.buffer_id) + gl.vertexAttribPointer(shaderProgram.vertexColorAttribute, triangleVertexColorBuffer.itemSize, gl.FLOAT, false, 0, 0) - glNode:drawArrays(GLConstant.TRIANGLES, 0, triangleVertexPositionBuffer.numItems) + gl.drawArrays(gl.TRIANGLES, 0, triangleVertexPositionBuffer.numItems) - glNode:_bindBuffer(GLConstant.ARRAY_BUFFER, 0) + gl.bindBuffer(gl.ARRAY_BUFFER, 0) end local fshader = compileShader(fsh, 'fragment') local vshader = compileShader(vsh, 'vertex') - shaderProgram.program_id = glNode:_createProgram() - glNode:_attachShader(shaderProgram.program_id,vshader) - glNode:_attachShader(shaderProgram.program_id,fshader) - glNode:_linkProgram(shaderProgram.program_id) - if not glNode:_getProgramParameter(shaderProgram.program_id, GLConstant.LINK_STATUS) then + shaderProgram.program_id = gl.createProgram() + gl.attachShader(shaderProgram.program_id,vshader) + gl.attachShader(shaderProgram.program_id,fshader) + gl.linkProgram(shaderProgram.program_id) + if not gl.getProgramParameter(shaderProgram.program_id, gl.LINK_STATUS) then --throw print("Could not initialise shaders") end - glNode:_useProgram(shaderProgram.program_id) + gl.useProgram(shaderProgram.program_id) - shaderProgram.vertexPositionAttribute = glNode:_getAttribLocation(shaderProgram.program_id,"aVertexPosition") - glNode:enableVertexAttribArray(shaderProgram.vertexPositionAttribute) + shaderProgram.vertexPositionAttribute = gl.getAttribLocation(shaderProgram.program_id,"aVertexPosition") + gl.enableVertexAttribArray(shaderProgram.vertexPositionAttribute) - shaderProgram.vertexColorAttribute = glNode:_getAttribLocation(shaderProgram.program_id,"aVertexColor") - glNode:enableVertexAttribArray(shaderProgram.vertexColorAttribute) + shaderProgram.vertexColorAttribute = gl.getAttribLocation(shaderProgram.program_id,"aVertexColor") + gl.enableVertexAttribArray(shaderProgram.vertexColorAttribute) - shaderProgram.pMatrixUniform = glNode:_getUniformLocation(shaderProgram.program_id, "uPMatrix") - shaderProgram.mvMatrixUniform = glNode:_getUniformLocation(shaderProgram.program_id, "uMVMatrix") + shaderProgram.pMatrixUniform = gl.getUniformLocation(shaderProgram.program_id, "uPMatrix") + shaderProgram.mvMatrixUniform = gl.getUniformLocation(shaderProgram.program_id, "uMVMatrix") initBuffers() @@ -972,7 +973,7 @@ local function OpenGLTestMainLayer() local function createGLNodeCCAPITest() local nodeCCAPILayer = CCLayer:create() InitTitle(nodeCCAPILayer) - local glNode = GLNode:create() + local glNode = gl.glNodeCreate() nodeCCAPILayer:addChild(glNode,10) local shader = CCShaderCache:getInstance():getProgram("ShaderPositionColor") local triangleVertexPositionBuffer = {} @@ -981,70 +982,70 @@ local function OpenGLTestMainLayer() local squareVertexColorBuffer = {} local function initBuffers() - triangleVertexPositionBuffer.buffer_id = glNode:_createBuffer() - glNode:_bindBuffer(GLConstant.ARRAY_BUFFER, triangleVertexPositionBuffer.buffer_id) + triangleVertexPositionBuffer.buffer_id = gl.createBuffer() + gl.bindBuffer(gl.ARRAY_BUFFER, triangleVertexPositionBuffer.buffer_id) local vertices = { size.width / 2, size.height, 0, 0, size.width, 0 } - glNode:bufferData(GLConstant.ARRAY_BUFFER, table.getn(vertices), vertices, GLConstant.STATIC_DRAW) + gl.bufferData(gl.ARRAY_BUFFER, table.getn(vertices), vertices, gl.STATIC_DRAW) - triangleVertexColorBuffer.buffer_id = glNode:_createBuffer() - glNode:_bindBuffer(GLConstant.ARRAY_BUFFER, triangleVertexColorBuffer.buffer_id) + triangleVertexColorBuffer.buffer_id = gl.createBuffer() + gl.bindBuffer(gl.ARRAY_BUFFER, triangleVertexColorBuffer.buffer_id) local colors = { 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0 } - glNode:bufferData(GLConstant.ARRAY_BUFFER, table.getn(colors),colors, GLConstant.STATIC_DRAW) + gl.bufferData(gl.ARRAY_BUFFER, table.getn(colors),colors, gl.STATIC_DRAW) --Square - squareVertexPositionBuffer.buffer_id = glNode:_createBuffer() - glNode:_bindBuffer(GLConstant.ARRAY_BUFFER, squareVertexPositionBuffer.buffer_id) + squareVertexPositionBuffer.buffer_id = gl.createBuffer() + gl.bindBuffer(gl.ARRAY_BUFFER, squareVertexPositionBuffer.buffer_id) vertices = { size.width, size.height, 0, size.height, size.width, 0, 0, 0 } - glNode:bufferData(GLConstant.ARRAY_BUFFER, table.getn(vertices), vertices, GLConstant.STATIC_DRAW) + gl.bufferData(gl.ARRAY_BUFFER, table.getn(vertices), vertices, gl.STATIC_DRAW) - squareVertexColorBuffer.buffer_id = glNode:_createBuffer() - glNode:_bindBuffer(GLConstant.ARRAY_BUFFER, squareVertexColorBuffer.buffer_id) + squareVertexColorBuffer.buffer_id = gl.createBuffer() + gl.bindBuffer(gl.ARRAY_BUFFER, squareVertexColorBuffer.buffer_id) colors = { 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0 }; - glNode:bufferData(GLConstant.ARRAY_BUFFER, table.getn(colors), colors, GLConstant.STATIC_DRAW) - glNode:_bindBuffer(GLConstant.ARRAY_BUFFER, 0) + gl.bufferData(gl.ARRAY_BUFFER, table.getn(colors), colors, gl.STATIC_DRAW) + gl.bindBuffer(gl.ARRAY_BUFFER, 0) end local function GLNodeCCAPIDraw() shader:use() shader:setUniformsForBuiltins() - glNode:glEnableVertexAttribs(CCConstants.VERTEX_ATTRIB_FLAG_COLOR or CCConstants.VERTEX_ATTRIB_FLAG_POSITION) + gl.glEnableVertexAttribs(CCConstants.VERTEX_ATTRIB_FLAG_COLOR or CCConstants.VERTEX_ATTRIB_FLAG_POSITION) -- - glNode:_bindBuffer(GLConstant.ARRAY_BUFFER, squareVertexPositionBuffer.buffer_id) - glNode:vertexAttribPointer(CCConstants.VERTEX_ATTRIB_POSITION, 2, GLConstant.FLOAT, false, 0, 0) + gl.bindBuffer(gl.ARRAY_BUFFER, squareVertexPositionBuffer.buffer_id) + gl.vertexAttribPointer(CCConstants.VERTEX_ATTRIB_POSITION, 2, gl.FLOAT, false, 0, 0) - glNode:_bindBuffer(GLConstant.ARRAY_BUFFER, squareVertexColorBuffer.buffer_id) - glNode:vertexAttribPointer(CCConstants.VERTEX_ATTRIB_COLOR, 4, GLConstant.FLOAT, false, 0, 0) + gl.bindBuffer(gl.ARRAY_BUFFER, squareVertexColorBuffer.buffer_id) + gl.vertexAttribPointer(CCConstants.VERTEX_ATTRIB_COLOR, 4, gl.FLOAT, false, 0, 0) - glNode:drawArrays(GLConstant.TRIANGLE_STRIP, 0, 4) + gl.drawArrays(gl.TRIANGLE_STRIP, 0, 4) - glNode:_bindBuffer(GLConstant.ARRAY_BUFFER, triangleVertexPositionBuffer.buffer_id) - glNode:vertexAttribPointer(CCConstants.VERTEX_ATTRIB_POSITION, 2, GLConstant.FLOAT, false, 0, 0) + gl.bindBuffer(gl.ARRAY_BUFFER, triangleVertexPositionBuffer.buffer_id) + gl.vertexAttribPointer(CCConstants.VERTEX_ATTRIB_POSITION, 2, gl.FLOAT, false, 0, 0) - glNode:_bindBuffer(GLConstant.ARRAY_BUFFER, triangleVertexColorBuffer.buffer_id) - glNode:vertexAttribPointer(CCConstants.VERTEX_ATTRIB_COLOR, 4, GLConstant.FLOAT, false, 0, 0) + gl.bindBuffer(gl.ARRAY_BUFFER, triangleVertexColorBuffer.buffer_id) + gl.vertexAttribPointer(CCConstants.VERTEX_ATTRIB_COLOR, 4, gl.FLOAT, false, 0, 0) - glNode:drawArrays(GLConstant.TRIANGLE_STRIP, 0, 3) + gl.drawArrays(gl.TRIANGLE_STRIP, 0, 3) - glNode:_bindBuffer(GLConstant.ARRAY_BUFFER, 0) + gl.bindBuffer(gl.ARRAY_BUFFER, 0) end @@ -1057,19 +1058,19 @@ local function OpenGLTestMainLayer() local function createGLTexParamterTest() local glTexParamLayer = CCLayer:create() InitTitle(glTexParamLayer) - local glNode = GLNode:create() + local glNode = gl.glNodeCreate() glTexParamLayer:addChild(glNode,10) local function getTexValues() - glNode:_bindTexture(GLConstant.TEXTURE_2D, 0) - glNode:texParameteri(GLConstant.TEXTURE_2D, GLConstant.TEXTURE_MAG_FILTER, GLConstant.NEAREST) - glNode:texParameteri(GLConstant.TEXTURE_2D, GLConstant.TEXTURE_MIN_FILTER, GLConstant.NEAREST) - glNode:texParameteri( GLConstant.TEXTURE_2D, GLConstant.TEXTURE_WRAP_S, GLConstant.CLAMP_TO_EDGE ) - glNode:texParameteri( GLConstant.TEXTURE_2D, GLConstant.TEXTURE_WRAP_S, GLConstant.CLAMP_TO_EDGE ) + gl.bindTexture(gl.TEXTURE_2D, 0) + gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST) + gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST) + gl.texParameteri( gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE ) + gl.texParameteri( gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE ) - local mag = glNode:getTexParameter(GLConstant.TEXTURE_2D, GLConstant.TEXTURE_MAG_FILTER) - local min = glNode:getTexParameter(GLConstant.TEXTURE_2D, GLConstant.TEXTURE_MIN_FILTER) - local w_s = glNode:getTexParameter(GLConstant.TEXTURE_2D, GLConstant.TEXTURE_WRAP_S) - local w_t = glNode:getTexParameter(GLConstant.TEXTURE_2D, GLConstant.TEXTURE_WRAP_S) + local mag = gl.getTexParameter(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER) + local min = gl.getTexParameter(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER) + local w_s = gl.getTexParameter(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S) + local w_t = gl.getTexParameter(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S) local strFmt = string.format("%d %d %d %d",mag,min,w_s,w_t) print(strFmt) end @@ -1080,7 +1081,7 @@ local function OpenGLTestMainLayer() local function createGetUniformTest() local getUniformLayer = CCLayer:create() InitTitle(getUniformLayer) - local glNode = GLNode:create() + local glNode = gl.glNodeCreate() getUniformLayer:addChild(glNode,10) local pMatrix = {1,2,3,4, 4,3,2,1, 1,2,4,8, 1.1,1.2,1.3,1.4} @@ -1090,11 +1091,11 @@ local function OpenGLTestMainLayer() shader:use() - local loc = glNode:_getUniformLocation( program, "CC_MVPMatrix") + local loc = gl.getUniformLocation( program, "CC_MVPMatrix") - glNode:uniformMatrix4fv(loc, false, table.getn(pMatrix), pMatrix) + gl.uniformMatrix4fv(loc, false, table.getn(pMatrix), pMatrix) - local uniformTable = glNode:_getUniform( program, loc ) + local uniformTable = gl.getUniform( program, loc ) local count = table.getn(uniformTable) local strFmt = "" for i=1,count do diff --git a/samples/Lua/TestLua/proj.ios/TestLua.xcodeproj/project.pbxproj.REMOVED.git-id b/samples/Lua/TestLua/proj.ios/TestLua.xcodeproj/project.pbxproj.REMOVED.git-id index 1bd998acf1..99a77ce0b6 100644 --- a/samples/Lua/TestLua/proj.ios/TestLua.xcodeproj/project.pbxproj.REMOVED.git-id +++ b/samples/Lua/TestLua/proj.ios/TestLua.xcodeproj/project.pbxproj.REMOVED.git-id @@ -1 +1 @@ -6c9beabe357e6f6373ac919bcbcdaa36a3f3b58c \ No newline at end of file +91fe797e548a03b9251c37c8a7f24bc210b6e118 \ No newline at end of file diff --git a/scripting/lua/cocos2dx_support/LuaOpengl.cpp.REMOVED.git-id b/scripting/lua/cocos2dx_support/LuaOpengl.cpp.REMOVED.git-id index 2c3b33f8b0..434502fae0 100644 --- a/scripting/lua/cocos2dx_support/LuaOpengl.cpp.REMOVED.git-id +++ b/scripting/lua/cocos2dx_support/LuaOpengl.cpp.REMOVED.git-id @@ -1 +1 @@ -e110ce7b59357a987fd5383cd1aa89f254db2d45 \ No newline at end of file +fb7e01e5b657a41142a4774075e84a7436010de3 \ No newline at end of file diff --git a/scripting/lua/script/Opengl.lua b/scripting/lua/script/Opengl.lua new file mode 100644 index 0000000000..e71bfb54fc --- /dev/null +++ b/scripting/lua/script/Opengl.lua @@ -0,0 +1,299 @@ +require "OpenglConstants" + +gl = gl or {} + +--Create functions +function gl.createTexture() + local retTable = {} + retTable.texture_id = gl._createTexture() + return retTable +end + +function gl.createBuffer() + local retTable = {} + retTable.buffer_id = gl._createBuffer() + return retTable +end + +function gl.createRenderbuffer() + local retTable = {} + retTable.renderbuffer_id = gl._createRenderuffer() + return retTable +end + +function gl.createFramebuffer( ) + local retTable = {} + retTable.framebuffer_id = gl._createFramebuffer() + return retTable +end + +function gl.createProgram() + local retTable = {} + retTable.program_id = gl._createProgram() + return retTable +end + +function gl.createShader(shaderType) + local retTable = {} + retTable.shader_id = gl._createShader(shaderType) + return retTable +end + +--Delete Fun +function gl.deleteTexture(texture) + local texture_id = 0 + if "number" == type(texture) then + texture_id = texture + elseif "table" == type(texture) then + texture_id = texture.texture_id + end + gl._deleteTexture(texture_id) +end + +function gl.deleteBuffer(buffer) + local buffer_id = 0 + if "number" == type(buffer) then + buffer_id = buffer + elseif "table" == type(buffer) then + buffer_id = buffer.buffer_id + end + gl._deleteBuffer(buffer_id) +end + +function gl.deleteRenderbuffer(buffer) + local renderbuffer_id = 0 + if "number" == type(buffer) then + renderbuffer_id = buffer + elseif "table" == type(buffer) then + renderbuffer_id = buffer.renderbuffer_id + end + gl._deleteRenderbuffer(renderbuffer_id) +end + +function gl.deleteFramebuffer(buffer) + local framebuffer_id = 0 + if "number" == type(buffer) then + framebuffer_id = buffer + elseif "table" == type(buffer) then + framebuffer_id = buffer.framebuffer_id + end + gl._deleteFramebuffer(framebuffer_id) +end + +function gl.deleteProgram( program ) + local program_id = 0 + if "number" == type(buffer) then + program_id = program + elseif "table" == type(program) then + program_id = program.program_id + end + + gl._deleteProgram(program_id) +end + +function gl.deleteShader(shader) + local shader_id = 0 + if "number" == type(shader) then + shader_id = shader + elseif "table" == type(shader) then + shader_id = shader.shader_id + end + + gl._deleteShader(shader_id) +end + +--Bind Related +function gl.bindTexture(target, texture) + local texture_id = 0 + if "number" == type(texture) then + texture_id = texture + elseif "table" == type(texture) then + texture_id = texture.texture_id + end + + gl._bindTexture(target,texture_id) +end + +function gl.bindBuffer( target,buffer ) + local buffer_id = 0 + if "number" == type(buffer) then + buffer_id = buffer + elseif "table" == type(buffer) then + buffer_id = buffer.buffer_id + end + + gl._bindBuffer(target, buffer_id) +end + +function gl.bindRenderBuffer(target, buffer) + local buffer_id = 0 + + if "number" == type(buffer) then + buffer_id = buffer; + elseif "table" == type(buffer) then + buffer_id = buffer.buffer_id + end + + gl._bindRenderbuffer(target, buffer_id) +end + +function gl.bindFramebuffer(target, buffer) + local buffer_id = 0 + + if "number" == type(buffer) then + buffer_id = buffer + elseif "table" == type(buffer) then + buffer_id = buffer.buffer_id + end + + gl._bindFramebuffer(target, buffer_id) +end + +--Uniform related +function gl.getUniform(program, location) + local program_id = 0 + local location_id = 0 + + if "number" == type(program) then + program_id = program + else + program_id = program.program_id + end + + if "number" == type(location) then + location_id = location + else + location_id = location.location_id + end + + return gl._getUniform(program_id, location_id) +end + +--shader related +function gl.compileShader(shader) + gl._compileShader( shader.shader_id) +end + +function gl.shaderSource(shader, source) + gl._shaderSource(shader.shader_id, source) +end + +function gl.getShaderParameter(shader, e) + return gl._getShaderParameter(shader.shader_id,e) +end + +function gl.getShaderInfoLog( shader ) + return gl._getShaderInfoLog(shader.shader_id) +end + +--program related +function gl.attachShader( program, shader ) + local program_id = 0 + + if "number" == type(program) then + program_id = program + elseif "table" == type(program) then + program_id = program.program_id + end + + gl._attachShader(program_id, shader.shader_id) +end + +function gl.linkProgram( program ) + local program_id = 0 + + if "number" == type(program) then + program_id = program + elseif "table" == type(program) then + program_id = program.program_id + end + + gl._linkProgram(program_id) +end + +function gl.getProgramParameter(program, e) + local program_id = 0 + + if "number" == type(program) then + program_id = program + elseif "table" == type(program) then + program_id = program.program_id + end + + return gl._getProgramParameter(program_id, e) +end + +function gl.useProgram(program) + local program_id = 0 + if "number" == type(program) then + program_id = program + elseif "table" == type(program) then + program_id = program.program_id + end + + gl._useProgram (program_id) +end + +function gl.getAttribLocation(program, name ) + local program_id = 0 + + if "number" == type(program) then + program_id = program + elseif "table" == type(program) then + program_id = program.program_id + end + + return gl._getAttribLocation(program_id, name) +end + +function gl.getUniformLocation( program, name ) + local program_id = 0 + + if "number" == type(program) then + program_id = program + elseif "table" == type(program) then + program_id = program.program_id + end + + return gl._getUniformLocation(program_id,name) +end + +function gl.getActiveAttrib( program, index ) + local program_id = 0 + if "number" == type(program) then + program_id = program + elseif "table" == type(program) then + program_id = program.program_id + end + + return gl._getActiveAttrib(program_id, index); +end + +function gl.getActiveUniform( program, index ) + local program_id = 0 + + if "number" == type(program) then + program_id = program + elseif "table" == type(program) then + program_id = program.program_id + end + + return gl._getActiveUniform(program_id, index) +end + +function gl.getAttachedShaders(program) + local program_id = 0 + + if "number" == type(program) then + program_id = program + elseif "table" == type(program) then + program_id = program.program_id + end + + return gl._getAttachedShaders(program_id) +end + +function gl.glNodeCreate() + return GLNode:create() +end + diff --git a/scripting/lua/script/OpenglConstants.lua b/scripting/lua/script/OpenglConstants.lua index 661c496ca2..858d30a1cf 100644 --- a/scripting/lua/script/OpenglConstants.lua +++ b/scripting/lua/script/OpenglConstants.lua @@ -1,838 +1,824 @@ --Encapsulate opengl constants. -local GLConstant = {} - -GLConstant.GCCSO_SHADER_BINARY_FJ = 0x9260 -GLConstant._3DC_XY_AMD = 0x87fa -GLConstant._3DC_X_AMD = 0x87f9 -GLConstant.ACTIVE_ATTRIBUTES = 0x8b89 -GLConstant.ACTIVE_ATTRIBUTE_MAX_LENGTH = 0x8b8a -GLConstant.ACTIVE_PROGRAM_EXT = 0x8259 -GLConstant.ACTIVE_TEXTURE = 0x84e0 -GLConstant.ACTIVE_UNIFORMS = 0x8b86 -GLConstant.ACTIVE_UNIFORM_MAX_LENGTH = 0x8b87 -GLConstant.ALIASED_LINE_WIDTH_RANGE = 0x846e -GLConstant.ALIASED_POINT_SIZE_RANGE = 0x846d -GLConstant.ALL_COMPLETED_NV = 0x84f2 -GLConstant.ALL_SHADER_BITS_EXT = 0xffffffff -GLConstant.ALPHA = 0x1906 -GLConstant.ALPHA16F_EXT = 0x881c -GLConstant.ALPHA32F_EXT = 0x8816 -GLConstant.ALPHA8_EXT = 0x803c -GLConstant.ALPHA8_OES = 0x803c -GLConstant.ALPHA_BITS = 0xd55 -GLConstant.ALPHA_TEST_FUNC_QCOM = 0xbc1 -GLConstant.ALPHA_TEST_QCOM = 0xbc0 -GLConstant.ALPHA_TEST_REF_QCOM = 0xbc2 -GLConstant.ALREADY_SIGNALED_APPLE = 0x911a -GLConstant.ALWAYS = 0x207 -GLConstant.AMD_compressed_3DC_texture = 0x1 -GLConstant.AMD_compressed_ATC_texture = 0x1 -GLConstant.AMD_performance_monitor = 0x1 -GLConstant.AMD_program_binary_Z400 = 0x1 -GLConstant.ANGLE_depth_texture = 0x1 -GLConstant.ANGLE_framebuffer_blit = 0x1 -GLConstant.ANGLE_framebuffer_multisample = 0x1 -GLConstant.ANGLE_instanced_arrays = 0x1 -GLConstant.ANGLE_pack_reverse_row_order = 0x1 -GLConstant.ANGLE_program_binary = 0x1 -GLConstant.ANGLE_texture_compression_dxt3 = 0x1 -GLConstant.ANGLE_texture_compression_dxt5 = 0x1 -GLConstant.ANGLE_texture_usage = 0x1 -GLConstant.ANGLE_translated_shader_source = 0x1 -GLConstant.ANY_SAMPLES_PASSED_CONSERVATIVE_EXT = 0x8d6a -GLConstant.ANY_SAMPLES_PASSED_EXT = 0x8c2f -GLConstant.APPLE_copy_texture_levels = 0x1 -GLConstant.APPLE_framebuffer_multisample = 0x1 -GLConstant.APPLE_rgb_422 = 0x1 -GLConstant.APPLE_sync = 0x1 -GLConstant.APPLE_texture_format_BGRA8888 = 0x1 -GLConstant.APPLE_texture_max_level = 0x1 -GLConstant.ARM_mali_program_binary = 0x1 -GLConstant.ARM_mali_shader_binary = 0x1 -GLConstant.ARM_rgba8 = 0x1 -GLConstant.ARRAY_BUFFER = 0x8892 -GLConstant.ARRAY_BUFFER_BINDING = 0x8894 -GLConstant.ATC_RGBA_EXPLICIT_ALPHA_AMD = 0x8c93 -GLConstant.ATC_RGBA_INTERPOLATED_ALPHA_AMD = 0x87ee -GLConstant.ATC_RGB_AMD = 0x8c92 -GLConstant.ATTACHED_SHADERS = 0x8b85 -GLConstant.BACK = 0x405 -GLConstant.BGRA8_EXT = 0x93a1 -GLConstant.BGRA_EXT = 0x80e1 -GLConstant.BGRA_IMG = 0x80e1 -GLConstant.BINNING_CONTROL_HINT_QCOM = 0x8fb0 -GLConstant.BLEND = 0xbe2 -GLConstant.BLEND_COLOR = 0x8005 -GLConstant.BLEND_DST_ALPHA = 0x80ca -GLConstant.BLEND_DST_RGB = 0x80c8 -GLConstant.BLEND_EQUATION = 0x8009 -GLConstant.BLEND_EQUATION_ALPHA = 0x883d -GLConstant.BLEND_EQUATION_RGB = 0x8009 -GLConstant.BLEND_SRC_ALPHA = 0x80cb -GLConstant.BLEND_SRC_RGB = 0x80c9 -GLConstant.BLUE_BITS = 0xd54 -GLConstant.BOOL = 0x8b56 -GLConstant.BOOL_VEC2 = 0x8b57 -GLConstant.BOOL_VEC3 = 0x8b58 -GLConstant.BOOL_VEC4 = 0x8b59 -GLConstant.BUFFER = 0x82e0 -GLConstant.BUFFER_ACCESS_OES = 0x88bb -GLConstant.BUFFER_MAPPED_OES = 0x88bc -GLConstant.BUFFER_MAP_POINTER_OES = 0x88bd -GLConstant.BUFFER_OBJECT_EXT = 0x9151 -GLConstant.BUFFER_SIZE = 0x8764 -GLConstant.BUFFER_USAGE = 0x8765 -GLConstant.BYTE = 0x1400 -GLConstant.CCW = 0x901 -GLConstant.CLAMP_TO_BORDER_NV = 0x812d -GLConstant.CLAMP_TO_EDGE = 0x812f -GLConstant.COLOR_ATTACHMENT0 = 0x8ce0 -GLConstant.COLOR_ATTACHMENT0_NV = 0x8ce0 -GLConstant.COLOR_ATTACHMENT10_NV = 0x8cea -GLConstant.COLOR_ATTACHMENT11_NV = 0x8ceb -GLConstant.COLOR_ATTACHMENT12_NV = 0x8cec -GLConstant.COLOR_ATTACHMENT13_NV = 0x8ced -GLConstant.COLOR_ATTACHMENT14_NV = 0x8cee -GLConstant.COLOR_ATTACHMENT15_NV = 0x8cef -GLConstant.COLOR_ATTACHMENT1_NV = 0x8ce1 -GLConstant.COLOR_ATTACHMENT2_NV = 0x8ce2 -GLConstant.COLOR_ATTACHMENT3_NV = 0x8ce3 -GLConstant.COLOR_ATTACHMENT4_NV = 0x8ce4 -GLConstant.COLOR_ATTACHMENT5_NV = 0x8ce5 -GLConstant.COLOR_ATTACHMENT6_NV = 0x8ce6 -GLConstant.COLOR_ATTACHMENT7_NV = 0x8ce7 -GLConstant.COLOR_ATTACHMENT8_NV = 0x8ce8 -GLConstant.COLOR_ATTACHMENT9_NV = 0x8ce9 -GLConstant.COLOR_ATTACHMENT_EXT = 0x90f0 -GLConstant.COLOR_BUFFER_BIT = 0x4000 -GLConstant.COLOR_BUFFER_BIT0_QCOM = 0x1 -GLConstant.COLOR_BUFFER_BIT1_QCOM = 0x2 -GLConstant.COLOR_BUFFER_BIT2_QCOM = 0x4 -GLConstant.COLOR_BUFFER_BIT3_QCOM = 0x8 -GLConstant.COLOR_BUFFER_BIT4_QCOM = 0x10 -GLConstant.COLOR_BUFFER_BIT5_QCOM = 0x20 -GLConstant.COLOR_BUFFER_BIT6_QCOM = 0x40 -GLConstant.COLOR_BUFFER_BIT7_QCOM = 0x80 -GLConstant.COLOR_CLEAR_VALUE = 0xc22 -GLConstant.COLOR_EXT = 0x1800 -GLConstant.COLOR_WRITEMASK = 0xc23 -GLConstant.COMPARE_REF_TO_TEXTURE_EXT = 0x884e -GLConstant.COMPILE_STATUS = 0x8b81 -GLConstant.COMPRESSED_RGBA_ASTC_10x10_KHR = 0x93bb -GLConstant.COMPRESSED_RGBA_ASTC_10x5_KHR = 0x93b8 -GLConstant.COMPRESSED_RGBA_ASTC_10x6_KHR = 0x93b9 -GLConstant.COMPRESSED_RGBA_ASTC_10x8_KHR = 0x93ba -GLConstant.COMPRESSED_RGBA_ASTC_12x10_KHR = 0x93bc -GLConstant.COMPRESSED_RGBA_ASTC_12x12_KHR = 0x93bd -GLConstant.COMPRESSED_RGBA_ASTC_4x4_KHR = 0x93b0 -GLConstant.COMPRESSED_RGBA_ASTC_5x4_KHR = 0x93b1 -GLConstant.COMPRESSED_RGBA_ASTC_5x5_KHR = 0x93b2 -GLConstant.COMPRESSED_RGBA_ASTC_6x5_KHR = 0x93b3 -GLConstant.COMPRESSED_RGBA_ASTC_6x6_KHR = 0x93b4 -GLConstant.COMPRESSED_RGBA_ASTC_8x5_KHR = 0x93b5 -GLConstant.COMPRESSED_RGBA_ASTC_8x6_KHR = 0x93b6 -GLConstant.COMPRESSED_RGBA_ASTC_8x8_KHR = 0x93b7 -GLConstant.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG = 0x8c03 -GLConstant.COMPRESSED_RGBA_PVRTC_2BPPV2_IMG = 0x9137 -GLConstant.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG = 0x8c02 -GLConstant.COMPRESSED_RGBA_PVRTC_4BPPV2_IMG = 0x9138 -GLConstant.COMPRESSED_RGBA_S3TC_DXT1_EXT = 0x83f1 -GLConstant.COMPRESSED_RGBA_S3TC_DXT3_ANGLE = 0x83f2 -GLConstant.COMPRESSED_RGBA_S3TC_DXT5_ANGLE = 0x83f3 -GLConstant.COMPRESSED_RGB_PVRTC_2BPPV1_IMG = 0x8c01 -GLConstant.COMPRESSED_RGB_PVRTC_4BPPV1_IMG = 0x8c00 -GLConstant.COMPRESSED_RGB_S3TC_DXT1_EXT = 0x83f0 -GLConstant.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR = 0x93db -GLConstant.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR = 0x93d8 -GLConstant.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR = 0x93d9 -GLConstant.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR = 0x93da -GLConstant.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR = 0x93dc -GLConstant.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR = 0x93dd -GLConstant.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR = 0x93d0 -GLConstant.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR = 0x93d1 -GLConstant.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR = 0x93d2 -GLConstant.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR = 0x93d3 -GLConstant.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR = 0x93d4 -GLConstant.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR = 0x93d5 -GLConstant.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR = 0x93d6 -GLConstant.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR = 0x93d7 -GLConstant.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_NV = 0x8c4d -GLConstant.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_NV = 0x8c4e -GLConstant.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_NV = 0x8c4f -GLConstant.COMPRESSED_SRGB_S3TC_DXT1_NV = 0x8c4c -GLConstant.COMPRESSED_TEXTURE_FORMATS = 0x86a3 -GLConstant.CONDITION_SATISFIED_APPLE = 0x911c -GLConstant.CONSTANT_ALPHA = 0x8003 -GLConstant.CONSTANT_COLOR = 0x8001 -GLConstant.CONTEXT_FLAG_DEBUG_BIT = 0x2 -GLConstant.CONTEXT_ROBUST_ACCESS_EXT = 0x90f3 -GLConstant.COUNTER_RANGE_AMD = 0x8bc1 -GLConstant.COUNTER_TYPE_AMD = 0x8bc0 -GLConstant.COVERAGE_ALL_FRAGMENTS_NV = 0x8ed5 -GLConstant.COVERAGE_ATTACHMENT_NV = 0x8ed2 -GLConstant.COVERAGE_AUTOMATIC_NV = 0x8ed7 -GLConstant.COVERAGE_BUFFERS_NV = 0x8ed3 -GLConstant.COVERAGE_BUFFER_BIT_NV = 0x8000 -GLConstant.COVERAGE_COMPONENT4_NV = 0x8ed1 -GLConstant.COVERAGE_COMPONENT_NV = 0x8ed0 -GLConstant.COVERAGE_EDGE_FRAGMENTS_NV = 0x8ed6 -GLConstant.COVERAGE_SAMPLES_NV = 0x8ed4 -GLConstant.CPU_OPTIMIZED_QCOM = 0x8fb1 -GLConstant.CULL_FACE = 0xb44 -GLConstant.CULL_FACE_MODE = 0xb45 -GLConstant.CURRENT_PROGRAM = 0x8b8d -GLConstant.CURRENT_QUERY_EXT = 0x8865 -GLConstant.CURRENT_VERTEX_ATTRIB = 0x8626 -GLConstant.CW = 0x900 -GLConstant.DEBUG_CALLBACK_FUNCTION = 0x8244 -GLConstant.DEBUG_CALLBACK_USER_PARAM = 0x8245 -GLConstant.DEBUG_GROUP_STACK_DEPTH = 0x826d -GLConstant.DEBUG_LOGGED_MESSAGES = 0x9145 -GLConstant.DEBUG_NEXT_LOGGED_MESSAGE_LENGTH = 0x8243 -GLConstant.DEBUG_OUTPUT = 0x92e0 -GLConstant.DEBUG_OUTPUT_SYNCHRONOUS = 0x8242 -GLConstant.DEBUG_SEVERITY_HIGH = 0x9146 -GLConstant.DEBUG_SEVERITY_LOW = 0x9148 -GLConstant.DEBUG_SEVERITY_MEDIUM = 0x9147 -GLConstant.DEBUG_SEVERITY_NOTIFICATION = 0x826b -GLConstant.DEBUG_SOURCE_API = 0x8246 -GLConstant.DEBUG_SOURCE_APPLICATION = 0x824a -GLConstant.DEBUG_SOURCE_OTHER = 0x824b -GLConstant.DEBUG_SOURCE_SHADER_COMPILER = 0x8248 -GLConstant.DEBUG_SOURCE_THIRD_PARTY = 0x8249 -GLConstant.DEBUG_SOURCE_WINDOW_SYSTEM = 0x8247 -GLConstant.DEBUG_TYPE_DEPRECATED_BEHAVIOR = 0x824d -GLConstant.DEBUG_TYPE_ERROR = 0x824c -GLConstant.DEBUG_TYPE_MARKER = 0x8268 -GLConstant.DEBUG_TYPE_OTHER = 0x8251 -GLConstant.DEBUG_TYPE_PERFORMANCE = 0x8250 -GLConstant.DEBUG_TYPE_POP_GROUP = 0x826a -GLConstant.DEBUG_TYPE_PORTABILITY = 0x824f -GLConstant.DEBUG_TYPE_PUSH_GROUP = 0x8269 -GLConstant.DEBUG_TYPE_UNDEFINED_BEHAVIOR = 0x824e -GLConstant.DECR = 0x1e03 -GLConstant.DECR_WRAP = 0x8508 -GLConstant.DELETE_STATUS = 0x8b80 -GLConstant.DEPTH24_STENCIL8_OES = 0x88f0 -GLConstant.DEPTH_ATTACHMENT = 0x8d00 -GLConstant.DEPTH_BITS = 0xd56 -GLConstant.DEPTH_BUFFER_BIT = 0x100 -GLConstant.DEPTH_BUFFER_BIT0_QCOM = 0x100 -GLConstant.DEPTH_BUFFER_BIT1_QCOM = 0x200 -GLConstant.DEPTH_BUFFER_BIT2_QCOM = 0x400 -GLConstant.DEPTH_BUFFER_BIT3_QCOM = 0x800 -GLConstant.DEPTH_BUFFER_BIT4_QCOM = 0x1000 -GLConstant.DEPTH_BUFFER_BIT5_QCOM = 0x2000 -GLConstant.DEPTH_BUFFER_BIT6_QCOM = 0x4000 -GLConstant.DEPTH_BUFFER_BIT7_QCOM = 0x8000 -GLConstant.DEPTH_CLEAR_VALUE = 0xb73 -GLConstant.DEPTH_COMPONENT = 0x1902 -GLConstant.DEPTH_COMPONENT16 = 0x81a5 -GLConstant.DEPTH_COMPONENT16_NONLINEAR_NV = 0x8e2c -GLConstant.DEPTH_COMPONENT16_OES = 0x81a5 -GLConstant.DEPTH_COMPONENT24_OES = 0x81a6 -GLConstant.DEPTH_COMPONENT32_OES = 0x81a7 -GLConstant.DEPTH_EXT = 0x1801 -GLConstant.DEPTH_FUNC = 0xb74 -GLConstant.DEPTH_RANGE = 0xb70 -GLConstant.DEPTH_STENCIL_OES = 0x84f9 -GLConstant.DEPTH_TEST = 0xb71 -GLConstant.DEPTH_WRITEMASK = 0xb72 -GLConstant.DITHER = 0xbd0 -GLConstant.DMP_shader_binary = 0x1 -GLConstant.DONT_CARE = 0x1100 -GLConstant.DRAW_BUFFER0_NV = 0x8825 -GLConstant.DRAW_BUFFER10_NV = 0x882f -GLConstant.DRAW_BUFFER11_NV = 0x8830 -GLConstant.DRAW_BUFFER12_NV = 0x8831 -GLConstant.DRAW_BUFFER13_NV = 0x8832 -GLConstant.DRAW_BUFFER14_NV = 0x8833 -GLConstant.DRAW_BUFFER15_NV = 0x8834 -GLConstant.DRAW_BUFFER1_NV = 0x8826 -GLConstant.DRAW_BUFFER2_NV = 0x8827 -GLConstant.DRAW_BUFFER3_NV = 0x8828 -GLConstant.DRAW_BUFFER4_NV = 0x8829 -GLConstant.DRAW_BUFFER5_NV = 0x882a -GLConstant.DRAW_BUFFER6_NV = 0x882b -GLConstant.DRAW_BUFFER7_NV = 0x882c -GLConstant.DRAW_BUFFER8_NV = 0x882d -GLConstant.DRAW_BUFFER9_NV = 0x882e -GLConstant.DRAW_BUFFER_EXT = 0xc01 -GLConstant.DRAW_FRAMEBUFFER_ANGLE = 0x8ca9 -GLConstant.DRAW_FRAMEBUFFER_APPLE = 0x8ca9 -GLConstant.DRAW_FRAMEBUFFER_BINDING_ANGLE = 0x8ca6 -GLConstant.DRAW_FRAMEBUFFER_BINDING_APPLE = 0x8ca6 -GLConstant.DRAW_FRAMEBUFFER_BINDING_NV = 0x8ca6 -GLConstant.DRAW_FRAMEBUFFER_NV = 0x8ca9 -GLConstant.DST_ALPHA = 0x304 -GLConstant.DST_COLOR = 0x306 -GLConstant.DYNAMIC_DRAW = 0x88e8 -GLConstant.ELEMENT_ARRAY_BUFFER = 0x8893 -GLConstant.ELEMENT_ARRAY_BUFFER_BINDING = 0x8895 -GLConstant.EQUAL = 0x202 -GLConstant.ES_VERSION_2_0 = 0x1 -GLConstant.ETC1_RGB8_OES = 0x8d64 -GLConstant.ETC1_SRGB8_NV = 0x88ee -GLConstant.EXTENSIONS = 0x1f03 -GLConstant.EXT_blend_minmax = 0x1 -GLConstant.EXT_color_buffer_half_float = 0x1 -GLConstant.EXT_debug_label = 0x1 -GLConstant.EXT_debug_marker = 0x1 -GLConstant.EXT_discard_framebuffer = 0x1 -GLConstant.EXT_map_buffer_range = 0x1 -GLConstant.EXT_multi_draw_arrays = 0x1 -GLConstant.EXT_multisampled_render_to_texture = 0x1 -GLConstant.EXT_multiview_draw_buffers = 0x1 -GLConstant.EXT_occlusion_query_boolean = 0x1 -GLConstant.EXT_read_format_bgra = 0x1 -GLConstant.EXT_robustness = 0x1 -GLConstant.EXT_sRGB = 0x1 -GLConstant.EXT_separate_shader_objects = 0x1 -GLConstant.EXT_shader_framebuffer_fetch = 0x1 -GLConstant.EXT_shader_texture_lod = 0x1 -GLConstant.EXT_shadow_samplers = 0x1 -GLConstant.EXT_texture_compression_dxt1 = 0x1 -GLConstant.EXT_texture_filter_anisotropic = 0x1 -GLConstant.EXT_texture_format_BGRA8888 = 0x1 -GLConstant.EXT_texture_rg = 0x1 -GLConstant.EXT_texture_storage = 0x1 -GLConstant.EXT_texture_type_2_10_10_10_REV = 0x1 -GLConstant.EXT_unpack_subimage = 0x1 -GLConstant.FALSE = 0x0 -GLConstant.FASTEST = 0x1101 -GLConstant.FENCE_CONDITION_NV = 0x84f4 -GLConstant.FENCE_STATUS_NV = 0x84f3 -GLConstant.FIXED = 0x140c -GLConstant.FJ_shader_binary_GCCSO = 0x1 -GLConstant.FLOAT = 0x1406 -GLConstant.FLOAT_MAT2 = 0x8b5a -GLConstant.FLOAT_MAT3 = 0x8b5b -GLConstant.FLOAT_MAT4 = 0x8b5c -GLConstant.FLOAT_VEC2 = 0x8b50 -GLConstant.FLOAT_VEC3 = 0x8b51 -GLConstant.FLOAT_VEC4 = 0x8b52 -GLConstant.FRAGMENT_SHADER = 0x8b30 -GLConstant.FRAGMENT_SHADER_BIT_EXT = 0x2 -GLConstant.FRAGMENT_SHADER_DERIVATIVE_HINT_OES = 0x8b8b -GLConstant.FRAGMENT_SHADER_DISCARDS_SAMPLES_EXT = 0x8a52 -GLConstant.FRAMEBUFFER = 0x8d40 -GLConstant.FRAMEBUFFER_ATTACHMENT_ANGLE = 0x93a3 -GLConstant.FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT = 0x8210 -GLConstant.FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT = 0x8211 -GLConstant.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME = 0x8cd1 -GLConstant.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE = 0x8cd0 -GLConstant.FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_OES = 0x8cd4 -GLConstant.FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE = 0x8cd3 -GLConstant.FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL = 0x8cd2 -GLConstant.FRAMEBUFFER_ATTACHMENT_TEXTURE_SAMPLES_EXT = 0x8d6c -GLConstant.FRAMEBUFFER_BINDING = 0x8ca6 -GLConstant.FRAMEBUFFER_COMPLETE = 0x8cd5 -GLConstant.FRAMEBUFFER_INCOMPLETE_ATTACHMENT = 0x8cd6 -GLConstant.FRAMEBUFFER_INCOMPLETE_DIMENSIONS = 0x8cd9 -GLConstant.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT = 0x8cd7 -GLConstant.FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_ANGLE = 0x8d56 -GLConstant.FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_APPLE = 0x8d56 -GLConstant.FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT = 0x8d56 -GLConstant.FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_IMG = 0x9134 -GLConstant.FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_NV = 0x8d56 -GLConstant.FRAMEBUFFER_UNDEFINED_OES = 0x8219 -GLConstant.FRAMEBUFFER_UNSUPPORTED = 0x8cdd -GLConstant.FRONT = 0x404 -GLConstant.FRONT_AND_BACK = 0x408 -GLConstant.FRONT_FACE = 0xb46 -GLConstant.FUNC_ADD = 0x8006 -GLConstant.FUNC_REVERSE_SUBTRACT = 0x800b -GLConstant.FUNC_SUBTRACT = 0x800a -GLConstant.GENERATE_MIPMAP_HINT = 0x8192 -GLConstant.GEQUAL = 0x206 -GLConstant.GPU_OPTIMIZED_QCOM = 0x8fb2 -GLConstant.GREATER = 0x204 -GLConstant.GREEN_BITS = 0xd53 -GLConstant.GUILTY_CONTEXT_RESET_EXT = 0x8253 -GLConstant.HALF_FLOAT_OES = 0x8d61 -GLConstant.HIGH_FLOAT = 0x8df2 -GLConstant.HIGH_INT = 0x8df5 -GLConstant.IMG_multisampled_render_to_texture = 0x1 -GLConstant.IMG_program_binary = 0x1 -GLConstant.IMG_read_format = 0x1 -GLConstant.IMG_shader_binary = 0x1 -GLConstant.IMG_texture_compression_pvrtc = 0x1 -GLConstant.IMG_texture_compression_pvrtc2 = 0x1 -GLConstant.IMPLEMENTATION_COLOR_READ_FORMAT = 0x8b9b -GLConstant.IMPLEMENTATION_COLOR_READ_TYPE = 0x8b9a -GLConstant.INCR = 0x1e02 -GLConstant.INCR_WRAP = 0x8507 -GLConstant.INFO_LOG_LENGTH = 0x8b84 -GLConstant.INNOCENT_CONTEXT_RESET_EXT = 0x8254 -GLConstant.INT = 0x1404 -GLConstant.INT_10_10_10_2_OES = 0x8df7 -GLConstant.INT_VEC2 = 0x8b53 -GLConstant.INT_VEC3 = 0x8b54 -GLConstant.INT_VEC4 = 0x8b55 -GLConstant.INVALID_ENUM = 0x500 -GLConstant.INVALID_FRAMEBUFFER_OPERATION = 0x506 -GLConstant.INVALID_OPERATION = 0x502 -GLConstant.INVALID_VALUE = 0x501 -GLConstant.INVERT = 0x150a -GLConstant.KEEP = 0x1e00 -GLConstant.KHR_debug = 0x1 -GLConstant.KHR_texture_compression_astc_ldr = 0x1 -GLConstant.LEQUAL = 0x203 -GLConstant.LESS = 0x201 -GLConstant.LINEAR = 0x2601 -GLConstant.LINEAR_MIPMAP_LINEAR = 0x2703 -GLConstant.LINEAR_MIPMAP_NEAREST = 0x2701 -GLConstant.LINES = 0x1 -GLConstant.LINE_LOOP = 0x2 -GLConstant.LINE_STRIP = 0x3 -GLConstant.LINE_WIDTH = 0xb21 -GLConstant.LINK_STATUS = 0x8b82 -GLConstant.LOSE_CONTEXT_ON_RESET_EXT = 0x8252 -GLConstant.LOW_FLOAT = 0x8df0 -GLConstant.LOW_INT = 0x8df3 -GLConstant.LUMINANCE = 0x1909 -GLConstant.LUMINANCE16F_EXT = 0x881e -GLConstant.LUMINANCE32F_EXT = 0x8818 -GLConstant.LUMINANCE4_ALPHA4_OES = 0x8043 -GLConstant.LUMINANCE8_ALPHA8_EXT = 0x8045 -GLConstant.LUMINANCE8_ALPHA8_OES = 0x8045 -GLConstant.LUMINANCE8_EXT = 0x8040 -GLConstant.LUMINANCE8_OES = 0x8040 -GLConstant.LUMINANCE_ALPHA = 0x190a -GLConstant.LUMINANCE_ALPHA16F_EXT = 0x881f -GLConstant.LUMINANCE_ALPHA32F_EXT = 0x8819 -GLConstant.MALI_PROGRAM_BINARY_ARM = 0x8f61 -GLConstant.MALI_SHADER_BINARY_ARM = 0x8f60 -GLConstant.MAP_FLUSH_EXPLICIT_BIT_EXT = 0x10 -GLConstant.MAP_INVALIDATE_BUFFER_BIT_EXT = 0x8 -GLConstant.MAP_INVALIDATE_RANGE_BIT_EXT = 0x4 -GLConstant.MAP_READ_BIT_EXT = 0x1 -GLConstant.MAP_UNSYNCHRONIZED_BIT_EXT = 0x20 -GLConstant.MAP_WRITE_BIT_EXT = 0x2 -GLConstant.MAX_3D_TEXTURE_SIZE_OES = 0x8073 -GLConstant.MAX_COLOR_ATTACHMENTS_NV = 0x8cdf -GLConstant.MAX_COMBINED_TEXTURE_IMAGE_UNITS = 0x8b4d -GLConstant.MAX_CUBE_MAP_TEXTURE_SIZE = 0x851c -GLConstant.MAX_DEBUG_GROUP_STACK_DEPTH = 0x826c -GLConstant.MAX_DEBUG_LOGGED_MESSAGES = 0x9144 -GLConstant.MAX_DEBUG_MESSAGE_LENGTH = 0x9143 -GLConstant.MAX_DRAW_BUFFERS_NV = 0x8824 -GLConstant.MAX_EXT = 0x8008 -GLConstant.MAX_FRAGMENT_UNIFORM_VECTORS = 0x8dfd -GLConstant.MAX_LABEL_LENGTH = 0x82e8 -GLConstant.MAX_MULTIVIEW_BUFFERS_EXT = 0x90f2 -GLConstant.MAX_RENDERBUFFER_SIZE = 0x84e8 -GLConstant.MAX_SAMPLES_ANGLE = 0x8d57 -GLConstant.MAX_SAMPLES_APPLE = 0x8d57 -GLConstant.MAX_SAMPLES_EXT = 0x8d57 -GLConstant.MAX_SAMPLES_IMG = 0x9135 -GLConstant.MAX_SAMPLES_NV = 0x8d57 -GLConstant.MAX_SERVER_WAIT_TIMEOUT_APPLE = 0x9111 -GLConstant.MAX_TEXTURE_IMAGE_UNITS = 0x8872 -GLConstant.MAX_TEXTURE_MAX_ANISOTROPY_EXT = 0x84ff -GLConstant.MAX_TEXTURE_SIZE = 0xd33 -GLConstant.MAX_VARYING_VECTORS = 0x8dfc -GLConstant.MAX_VERTEX_ATTRIBS = 0x8869 -GLConstant.MAX_VERTEX_TEXTURE_IMAGE_UNITS = 0x8b4c -GLConstant.MAX_VERTEX_UNIFORM_VECTORS = 0x8dfb -GLConstant.MAX_VIEWPORT_DIMS = 0xd3a -GLConstant.MEDIUM_FLOAT = 0x8df1 -GLConstant.MEDIUM_INT = 0x8df4 -GLConstant.MIN_EXT = 0x8007 -GLConstant.MIRRORED_REPEAT = 0x8370 -GLConstant.MULTISAMPLE_BUFFER_BIT0_QCOM = 0x1000000 -GLConstant.MULTISAMPLE_BUFFER_BIT1_QCOM = 0x2000000 -GLConstant.MULTISAMPLE_BUFFER_BIT2_QCOM = 0x4000000 -GLConstant.MULTISAMPLE_BUFFER_BIT3_QCOM = 0x8000000 -GLConstant.MULTISAMPLE_BUFFER_BIT4_QCOM = 0x10000000 -GLConstant.MULTISAMPLE_BUFFER_BIT5_QCOM = 0x20000000 -GLConstant.MULTISAMPLE_BUFFER_BIT6_QCOM = 0x40000000 -GLConstant.MULTISAMPLE_BUFFER_BIT7_QCOM = 0x80000000 -GLConstant.MULTIVIEW_EXT = 0x90f1 -GLConstant.NEAREST = 0x2600 -GLConstant.NEAREST_MIPMAP_LINEAR = 0x2702 -GLConstant.NEAREST_MIPMAP_NEAREST = 0x2700 -GLConstant.NEVER = 0x200 -GLConstant.NICEST = 0x1102 -GLConstant.NONE = 0x0 -GLConstant.NOTEQUAL = 0x205 -GLConstant.NO_ERROR = 0x0 -GLConstant.NO_RESET_NOTIFICATION_EXT = 0x8261 -GLConstant.NUM_COMPRESSED_TEXTURE_FORMATS = 0x86a2 -GLConstant.NUM_PROGRAM_BINARY_FORMATS_OES = 0x87fe -GLConstant.NUM_SHADER_BINARY_FORMATS = 0x8df9 -GLConstant.NV_coverage_sample = 0x1 -GLConstant.NV_depth_nonlinear = 0x1 -GLConstant.NV_draw_buffers = 0x1 -GLConstant.NV_draw_instanced = 0x1 -GLConstant.NV_fbo_color_attachments = 0x1 -GLConstant.NV_fence = 0x1 -GLConstant.NV_framebuffer_blit = 0x1 -GLConstant.NV_framebuffer_multisample = 0x1 -GLConstant.NV_generate_mipmap_sRGB = 0x1 -GLConstant.NV_instanced_arrays = 0x1 -GLConstant.NV_read_buffer = 0x1 -GLConstant.NV_read_buffer_front = 0x1 -GLConstant.NV_read_depth = 0x1 -GLConstant.NV_read_depth_stencil = 0x1 -GLConstant.NV_read_stencil = 0x1 -GLConstant.NV_sRGB_formats = 0x1 -GLConstant.NV_shadow_samplers_array = 0x1 -GLConstant.NV_shadow_samplers_cube = 0x1 -GLConstant.NV_texture_border_clamp = 0x1 -GLConstant.NV_texture_compression_s3tc_update = 0x1 -GLConstant.NV_texture_npot_2D_mipmap = 0x1 -GLConstant.OBJECT_TYPE_APPLE = 0x9112 -GLConstant.OES_EGL_image = 0x1 -GLConstant.OES_EGL_image_external = 0x1 -GLConstant.OES_compressed_ETC1_RGB8_texture = 0x1 -GLConstant.OES_compressed_paletted_texture = 0x1 -GLConstant.OES_depth24 = 0x1 -GLConstant.OES_depth32 = 0x1 -GLConstant.OES_depth_texture = 0x1 -GLConstant.OES_element_index_uint = 0x1 -GLConstant.OES_fbo_render_mipmap = 0x1 -GLConstant.OES_fragment_precision_high = 0x1 -GLConstant.OES_get_program_binary = 0x1 -GLConstant.OES_mapbuffer = 0x1 -GLConstant.OES_packed_depth_stencil = 0x1 -GLConstant.OES_required_internalformat = 0x1 -GLConstant.OES_rgb8_rgba8 = 0x1 -GLConstant.OES_standard_derivatives = 0x1 -GLConstant.OES_stencil1 = 0x1 -GLConstant.OES_stencil4 = 0x1 -GLConstant.OES_surfaceless_context = 0x1 -GLConstant.OES_texture_3D = 0x1 -GLConstant.OES_texture_float = 0x1 -GLConstant.OES_texture_float_linear = 0x1 -GLConstant.OES_texture_half_float = 0x1 -GLConstant.OES_texture_half_float_linear = 0x1 -GLConstant.OES_texture_npot = 0x1 -GLConstant.OES_vertex_array_object = 0x1 -GLConstant.OES_vertex_half_float = 0x1 -GLConstant.OES_vertex_type_10_10_10_2 = 0x1 -GLConstant.ONE = 0x1 -GLConstant.ONE_MINUS_CONSTANT_ALPHA = 0x8004 -GLConstant.ONE_MINUS_CONSTANT_COLOR = 0x8002 -GLConstant.ONE_MINUS_DST_ALPHA = 0x305 -GLConstant.ONE_MINUS_DST_COLOR = 0x307 -GLConstant.ONE_MINUS_SRC_ALPHA = 0x303 -GLConstant.ONE_MINUS_SRC_COLOR = 0x301 -GLConstant.OUT_OF_MEMORY = 0x505 -GLConstant.PACK_ALIGNMENT = 0xd05 -GLConstant.PACK_REVERSE_ROW_ORDER_ANGLE = 0x93a4 -GLConstant.PALETTE4_R5_G6_B5_OES = 0x8b92 -GLConstant.PALETTE4_RGB5_A1_OES = 0x8b94 -GLConstant.PALETTE4_RGB8_OES = 0x8b90 -GLConstant.PALETTE4_RGBA4_OES = 0x8b93 -GLConstant.PALETTE4_RGBA8_OES = 0x8b91 -GLConstant.PALETTE8_R5_G6_B5_OES = 0x8b97 -GLConstant.PALETTE8_RGB5_A1_OES = 0x8b99 -GLConstant.PALETTE8_RGB8_OES = 0x8b95 -GLConstant.PALETTE8_RGBA4_OES = 0x8b98 -GLConstant.PALETTE8_RGBA8_OES = 0x8b96 -GLConstant.PERCENTAGE_AMD = 0x8bc3 -GLConstant.PERFMON_GLOBAL_MODE_QCOM = 0x8fa0 -GLConstant.PERFMON_RESULT_AMD = 0x8bc6 -GLConstant.PERFMON_RESULT_AVAILABLE_AMD = 0x8bc4 -GLConstant.PERFMON_RESULT_SIZE_AMD = 0x8bc5 -GLConstant.POINTS = 0x0 -GLConstant.POLYGON_OFFSET_FACTOR = 0x8038 -GLConstant.POLYGON_OFFSET_FILL = 0x8037 -GLConstant.POLYGON_OFFSET_UNITS = 0x2a00 -GLConstant.PROGRAM = 0x82e2 -GLConstant.PROGRAM_BINARY_ANGLE = 0x93a6 -GLConstant.PROGRAM_BINARY_FORMATS_OES = 0x87ff -GLConstant.PROGRAM_BINARY_LENGTH_OES = 0x8741 -GLConstant.PROGRAM_OBJECT_EXT = 0x8b40 -GLConstant.PROGRAM_PIPELINE_BINDING_EXT = 0x825a -GLConstant.PROGRAM_PIPELINE_OBJECT_EXT = 0x8a4f -GLConstant.PROGRAM_SEPARABLE_EXT = 0x8258 -GLConstant.QCOM_alpha_test = 0x1 -GLConstant.QCOM_binning_control = 0x1 -GLConstant.QCOM_driver_control = 0x1 -GLConstant.QCOM_extended_get = 0x1 -GLConstant.QCOM_extended_get2 = 0x1 -GLConstant.QCOM_perfmon_global_mode = 0x1 -GLConstant.QCOM_tiled_rendering = 0x1 -GLConstant.QCOM_writeonly_rendering = 0x1 -GLConstant.QUERY = 0x82e3 -GLConstant.QUERY_OBJECT_EXT = 0x9153 -GLConstant.QUERY_RESULT_AVAILABLE_EXT = 0x8867 -GLConstant.QUERY_RESULT_EXT = 0x8866 -GLConstant.R16F_EXT = 0x822d -GLConstant.R32F_EXT = 0x822e -GLConstant.R8_EXT = 0x8229 -GLConstant.READ_BUFFER_EXT = 0xc02 -GLConstant.READ_BUFFER_NV = 0xc02 -GLConstant.READ_FRAMEBUFFER_ANGLE = 0x8ca8 -GLConstant.READ_FRAMEBUFFER_APPLE = 0x8ca8 -GLConstant.READ_FRAMEBUFFER_BINDING_ANGLE = 0x8caa -GLConstant.READ_FRAMEBUFFER_BINDING_APPLE = 0x8caa -GLConstant.READ_FRAMEBUFFER_BINDING_NV = 0x8caa -GLConstant.READ_FRAMEBUFFER_NV = 0x8ca8 -GLConstant.RED_BITS = 0xd52 -GLConstant.RED_EXT = 0x1903 -GLConstant.RENDERBUFFER = 0x8d41 -GLConstant.RENDERBUFFER_ALPHA_SIZE = 0x8d53 -GLConstant.RENDERBUFFER_BINDING = 0x8ca7 -GLConstant.RENDERBUFFER_BLUE_SIZE = 0x8d52 -GLConstant.RENDERBUFFER_DEPTH_SIZE = 0x8d54 -GLConstant.RENDERBUFFER_GREEN_SIZE = 0x8d51 -GLConstant.RENDERBUFFER_HEIGHT = 0x8d43 -GLConstant.RENDERBUFFER_INTERNAL_FORMAT = 0x8d44 -GLConstant.RENDERBUFFER_RED_SIZE = 0x8d50 -GLConstant.RENDERBUFFER_SAMPLES_ANGLE = 0x8cab -GLConstant.RENDERBUFFER_SAMPLES_APPLE = 0x8cab -GLConstant.RENDERBUFFER_SAMPLES_EXT = 0x8cab -GLConstant.RENDERBUFFER_SAMPLES_IMG = 0x9133 -GLConstant.RENDERBUFFER_SAMPLES_NV = 0x8cab -GLConstant.RENDERBUFFER_STENCIL_SIZE = 0x8d55 -GLConstant.RENDERBUFFER_WIDTH = 0x8d42 -GLConstant.RENDERER = 0x1f01 -GLConstant.RENDER_DIRECT_TO_FRAMEBUFFER_QCOM = 0x8fb3 -GLConstant.REPEAT = 0x2901 -GLConstant.REPLACE = 0x1e01 -GLConstant.REQUIRED_TEXTURE_IMAGE_UNITS_OES = 0x8d68 -GLConstant.RESET_NOTIFICATION_STRATEGY_EXT = 0x8256 -GLConstant.RG16F_EXT = 0x822f -GLConstant.RG32F_EXT = 0x8230 -GLConstant.RG8_EXT = 0x822b -GLConstant.RGB = 0x1907 -GLConstant.RGB10_A2_EXT = 0x8059 -GLConstant.RGB10_EXT = 0x8052 -GLConstant.RGB16F_EXT = 0x881b -GLConstant.RGB32F_EXT = 0x8815 -GLConstant.RGB565 = 0x8d62 -GLConstant.RGB565_OES = 0x8d62 -GLConstant.RGB5_A1 = 0x8057 -GLConstant.RGB5_A1_OES = 0x8057 -GLConstant.RGB8_OES = 0x8051 -GLConstant.RGBA = 0x1908 -GLConstant.RGBA16F_EXT = 0x881a -GLConstant.RGBA32F_EXT = 0x8814 -GLConstant.RGBA4 = 0x8056 -GLConstant.RGBA4_OES = 0x8056 -GLConstant.RGBA8_OES = 0x8058 -GLConstant.RGB_422_APPLE = 0x8a1f -GLConstant.RG_EXT = 0x8227 -GLConstant.SAMPLER = 0x82e6 -GLConstant.SAMPLER_2D = 0x8b5e -GLConstant.SAMPLER_2D_ARRAY_SHADOW_NV = 0x8dc4 -GLConstant.SAMPLER_2D_SHADOW_EXT = 0x8b62 -GLConstant.SAMPLER_3D_OES = 0x8b5f -GLConstant.SAMPLER_CUBE = 0x8b60 -GLConstant.SAMPLER_CUBE_SHADOW_NV = 0x8dc5 -GLConstant.SAMPLER_EXTERNAL_OES = 0x8d66 -GLConstant.SAMPLES = 0x80a9 -GLConstant.SAMPLE_ALPHA_TO_COVERAGE = 0x809e -GLConstant.SAMPLE_BUFFERS = 0x80a8 -GLConstant.SAMPLE_COVERAGE = 0x80a0 -GLConstant.SAMPLE_COVERAGE_INVERT = 0x80ab -GLConstant.SAMPLE_COVERAGE_VALUE = 0x80aa -GLConstant.SCISSOR_BOX = 0xc10 -GLConstant.SCISSOR_TEST = 0xc11 -GLConstant.SGX_BINARY_IMG = 0x8c0a -GLConstant.SGX_PROGRAM_BINARY_IMG = 0x9130 -GLConstant.SHADER = 0x82e1 -GLConstant.SHADER_BINARY_DMP = 0x9250 -GLConstant.SHADER_BINARY_FORMATS = 0x8df8 -GLConstant.SHADER_BINARY_VIV = 0x8fc4 -GLConstant.SHADER_COMPILER = 0x8dfa -GLConstant.SHADER_OBJECT_EXT = 0x8b48 -GLConstant.SHADER_SOURCE_LENGTH = 0x8b88 -GLConstant.SHADER_TYPE = 0x8b4f -GLConstant.SHADING_LANGUAGE_VERSION = 0x8b8c -GLConstant.SHORT = 0x1402 -GLConstant.SIGNALED_APPLE = 0x9119 -GLConstant.SLUMINANCE8_ALPHA8_NV = 0x8c45 -GLConstant.SLUMINANCE8_NV = 0x8c47 -GLConstant.SLUMINANCE_ALPHA_NV = 0x8c44 -GLConstant.SLUMINANCE_NV = 0x8c46 -GLConstant.SRC_ALPHA = 0x302 -GLConstant.SRC_ALPHA_SATURATE = 0x308 -GLConstant.SRC_COLOR = 0x300 -GLConstant.SRGB8_ALPHA8_EXT = 0x8c43 -GLConstant.SRGB8_NV = 0x8c41 -GLConstant.SRGB_ALPHA_EXT = 0x8c42 -GLConstant.SRGB_EXT = 0x8c40 -GLConstant.STACK_OVERFLOW = 0x503 -GLConstant.STACK_UNDERFLOW = 0x504 -GLConstant.STATE_RESTORE = 0x8bdc -GLConstant.STATIC_DRAW = 0x88e4 -GLConstant.STENCIL_ATTACHMENT = 0x8d20 -GLConstant.STENCIL_BACK_FAIL = 0x8801 -GLConstant.STENCIL_BACK_FUNC = 0x8800 -GLConstant.STENCIL_BACK_PASS_DEPTH_FAIL = 0x8802 -GLConstant.STENCIL_BACK_PASS_DEPTH_PASS = 0x8803 -GLConstant.STENCIL_BACK_REF = 0x8ca3 -GLConstant.STENCIL_BACK_VALUE_MASK = 0x8ca4 -GLConstant.STENCIL_BACK_WRITEMASK = 0x8ca5 -GLConstant.STENCIL_BITS = 0xd57 -GLConstant.STENCIL_BUFFER_BIT = 0x400 -GLConstant.STENCIL_BUFFER_BIT0_QCOM = 0x10000 -GLConstant.STENCIL_BUFFER_BIT1_QCOM = 0x20000 -GLConstant.STENCIL_BUFFER_BIT2_QCOM = 0x40000 -GLConstant.STENCIL_BUFFER_BIT3_QCOM = 0x80000 -GLConstant.STENCIL_BUFFER_BIT4_QCOM = 0x100000 -GLConstant.STENCIL_BUFFER_BIT5_QCOM = 0x200000 -GLConstant.STENCIL_BUFFER_BIT6_QCOM = 0x400000 -GLConstant.STENCIL_BUFFER_BIT7_QCOM = 0x800000 -GLConstant.STENCIL_CLEAR_VALUE = 0xb91 -GLConstant.STENCIL_EXT = 0x1802 -GLConstant.STENCIL_FAIL = 0xb94 -GLConstant.STENCIL_FUNC = 0xb92 -GLConstant.STENCIL_INDEX1_OES = 0x8d46 -GLConstant.STENCIL_INDEX4_OES = 0x8d47 -GLConstant.STENCIL_INDEX8 = 0x8d48 -GLConstant.STENCIL_PASS_DEPTH_FAIL = 0xb95 -GLConstant.STENCIL_PASS_DEPTH_PASS = 0xb96 -GLConstant.STENCIL_REF = 0xb97 -GLConstant.STENCIL_TEST = 0xb90 -GLConstant.STENCIL_VALUE_MASK = 0xb93 -GLConstant.STENCIL_WRITEMASK = 0xb98 -GLConstant.STREAM_DRAW = 0x88e0 -GLConstant.SUBPIXEL_BITS = 0xd50 -GLConstant.SYNC_CONDITION_APPLE = 0x9113 -GLConstant.SYNC_FENCE_APPLE = 0x9116 -GLConstant.SYNC_FLAGS_APPLE = 0x9115 -GLConstant.SYNC_FLUSH_COMMANDS_BIT_APPLE = 0x1 -GLConstant.SYNC_GPU_COMMANDS_COMPLETE_APPLE = 0x9117 -GLConstant.SYNC_OBJECT_APPLE = 0x8a53 -GLConstant.SYNC_STATUS_APPLE = 0x9114 -GLConstant.TEXTURE = 0x1702 -GLConstant.TEXTURE0 = 0x84c0 -GLConstant.TEXTURE1 = 0x84c1 -GLConstant.TEXTURE10 = 0x84ca -GLConstant.TEXTURE11 = 0x84cb -GLConstant.TEXTURE12 = 0x84cc -GLConstant.TEXTURE13 = 0x84cd -GLConstant.TEXTURE14 = 0x84ce -GLConstant.TEXTURE15 = 0x84cf -GLConstant.TEXTURE16 = 0x84d0 -GLConstant.TEXTURE17 = 0x84d1 -GLConstant.TEXTURE18 = 0x84d2 -GLConstant.TEXTURE19 = 0x84d3 -GLConstant.TEXTURE2 = 0x84c2 -GLConstant.TEXTURE20 = 0x84d4 -GLConstant.TEXTURE21 = 0x84d5 -GLConstant.TEXTURE22 = 0x84d6 -GLConstant.TEXTURE23 = 0x84d7 -GLConstant.TEXTURE24 = 0x84d8 -GLConstant.TEXTURE25 = 0x84d9 -GLConstant.TEXTURE26 = 0x84da -GLConstant.TEXTURE27 = 0x84db -GLConstant.TEXTURE28 = 0x84dc -GLConstant.TEXTURE29 = 0x84dd -GLConstant.TEXTURE3 = 0x84c3 -GLConstant.TEXTURE30 = 0x84de -GLConstant.TEXTURE31 = 0x84df -GLConstant.TEXTURE4 = 0x84c4 -GLConstant.TEXTURE5 = 0x84c5 -GLConstant.TEXTURE6 = 0x84c6 -GLConstant.TEXTURE7 = 0x84c7 -GLConstant.TEXTURE8 = 0x84c8 -GLConstant.TEXTURE9 = 0x84c9 -GLConstant.TEXTURE_2D = 0xde1 -GLConstant.TEXTURE_3D_OES = 0x806f -GLConstant.TEXTURE_BINDING_2D = 0x8069 -GLConstant.TEXTURE_BINDING_3D_OES = 0x806a -GLConstant.TEXTURE_BINDING_CUBE_MAP = 0x8514 -GLConstant.TEXTURE_BINDING_EXTERNAL_OES = 0x8d67 -GLConstant.TEXTURE_BORDER_COLOR_NV = 0x1004 -GLConstant.TEXTURE_COMPARE_FUNC_EXT = 0x884d -GLConstant.TEXTURE_COMPARE_MODE_EXT = 0x884c -GLConstant.TEXTURE_CUBE_MAP = 0x8513 -GLConstant.TEXTURE_CUBE_MAP_NEGATIVE_X = 0x8516 -GLConstant.TEXTURE_CUBE_MAP_NEGATIVE_Y = 0x8518 -GLConstant.TEXTURE_CUBE_MAP_NEGATIVE_Z = 0x851a -GLConstant.TEXTURE_CUBE_MAP_POSITIVE_X = 0x8515 -GLConstant.TEXTURE_CUBE_MAP_POSITIVE_Y = 0x8517 -GLConstant.TEXTURE_CUBE_MAP_POSITIVE_Z = 0x8519 -GLConstant.TEXTURE_DEPTH_QCOM = 0x8bd4 -GLConstant.TEXTURE_EXTERNAL_OES = 0x8d65 -GLConstant.TEXTURE_FORMAT_QCOM = 0x8bd6 -GLConstant.TEXTURE_HEIGHT_QCOM = 0x8bd3 -GLConstant.TEXTURE_IMAGE_VALID_QCOM = 0x8bd8 -GLConstant.TEXTURE_IMMUTABLE_FORMAT_EXT = 0x912f -GLConstant.TEXTURE_INTERNAL_FORMAT_QCOM = 0x8bd5 -GLConstant.TEXTURE_MAG_FILTER = 0x2800 -GLConstant.TEXTURE_MAX_ANISOTROPY_EXT = 0x84fe -GLConstant.TEXTURE_MAX_LEVEL_APPLE = 0x813d -GLConstant.TEXTURE_MIN_FILTER = 0x2801 -GLConstant.TEXTURE_NUM_LEVELS_QCOM = 0x8bd9 -GLConstant.TEXTURE_OBJECT_VALID_QCOM = 0x8bdb -GLConstant.TEXTURE_SAMPLES_IMG = 0x9136 -GLConstant.TEXTURE_TARGET_QCOM = 0x8bda -GLConstant.TEXTURE_TYPE_QCOM = 0x8bd7 -GLConstant.TEXTURE_USAGE_ANGLE = 0x93a2 -GLConstant.TEXTURE_WIDTH_QCOM = 0x8bd2 -GLConstant.TEXTURE_WRAP_R_OES = 0x8072 -GLConstant.TEXTURE_WRAP_S = 0x2802 -GLConstant.TEXTURE_WRAP_T = 0x2803 -GLConstant.TIMEOUT_EXPIRED_APPLE = 0x911b -GLConstant.TIMEOUT_IGNORED_APPLE = 0xffffffffffffffff -GLConstant.TRANSLATED_SHADER_SOURCE_LENGTH_ANGLE = 0x93a0 -GLConstant.TRIANGLES = 0x4 -GLConstant.TRIANGLE_FAN = 0x6 -GLConstant.TRIANGLE_STRIP = 0x5 -GLConstant.TRUE = 0x1 -GLConstant.UNKNOWN_CONTEXT_RESET_EXT = 0x8255 -GLConstant.UNPACK_ALIGNMENT = 0xcf5 -GLConstant.UNPACK_ROW_LENGTH = 0xcf2 -GLConstant.UNPACK_SKIP_PIXELS = 0xcf4 -GLConstant.UNPACK_SKIP_ROWS = 0xcf3 -GLConstant.UNSIGNALED_APPLE = 0x9118 -GLConstant.UNSIGNED_BYTE = 0x1401 -GLConstant.UNSIGNED_INT = 0x1405 -GLConstant.UNSIGNED_INT64_AMD = 0x8bc2 -GLConstant.UNSIGNED_INT_10_10_10_2_OES = 0x8df6 -GLConstant.UNSIGNED_INT_24_8_OES = 0x84fa -GLConstant.UNSIGNED_INT_2_10_10_10_REV_EXT = 0x8368 -GLConstant.UNSIGNED_NORMALIZED_EXT = 0x8c17 -GLConstant.UNSIGNED_SHORT = 0x1403 -GLConstant.UNSIGNED_SHORT_1_5_5_5_REV_EXT = 0x8366 -GLConstant.UNSIGNED_SHORT_4_4_4_4 = 0x8033 -GLConstant.UNSIGNED_SHORT_4_4_4_4_REV_EXT = 0x8365 -GLConstant.UNSIGNED_SHORT_4_4_4_4_REV_IMG = 0x8365 -GLConstant.UNSIGNED_SHORT_5_5_5_1 = 0x8034 -GLConstant.UNSIGNED_SHORT_5_6_5 = 0x8363 -GLConstant.UNSIGNED_SHORT_8_8_APPLE = 0x85ba -GLConstant.UNSIGNED_SHORT_8_8_REV_APPLE = 0x85bb -GLConstant.VALIDATE_STATUS = 0x8b83 -GLConstant.VENDOR = 0x1f00 -GLConstant.VERSION = 0x1f02 -GLConstant.VERTEX_ARRAY_BINDING_OES = 0x85b5 -GLConstant.VERTEX_ARRAY_OBJECT_EXT = 0x9154 -GLConstant.VERTEX_ATTRIB_ARRAY_BUFFER_BINDING = 0x889f -GLConstant.VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE = 0x88fe -GLConstant.VERTEX_ATTRIB_ARRAY_DIVISOR_NV = 0x88fe -GLConstant.VERTEX_ATTRIB_ARRAY_ENABLED = 0x8622 -GLConstant.VERTEX_ATTRIB_ARRAY_NORMALIZED = 0x886a -GLConstant.VERTEX_ATTRIB_ARRAY_POINTER = 0x8645 -GLConstant.VERTEX_ATTRIB_ARRAY_SIZE = 0x8623 -GLConstant.VERTEX_ATTRIB_ARRAY_STRIDE = 0x8624 -GLConstant.VERTEX_ATTRIB_ARRAY_TYPE = 0x8625 -GLConstant.VERTEX_SHADER = 0x8b31 -GLConstant.VERTEX_SHADER_BIT_EXT = 0x1 -GLConstant.VIEWPORT = 0xba2 -GLConstant.VIV_shader_binary = 0x1 -GLConstant.WAIT_FAILED_APPLE = 0x911d -GLConstant.WRITEONLY_RENDERING_QCOM = 0x8823 -GLConstant.WRITE_ONLY_OES = 0x88b9 -GLConstant.Z400_BINARY_AMD = 0x8740 -GLConstant.ZERO = 0x0 - -local modename = "GLConstant" -local GLConstantProxy = {} -local GLConstantMt = { - __index = GLConstant, - __newindex = function (t ,k ,v) - print("attemp to update a read-only table") - end -} -setmetatable(GLConstantProxy,GLConstantMt) -_G[modename] = GLConstantProxy -package.loaded[modename] = GLConstantProxy - +gl = gl or {} +gl.GCCSO_SHADER_BINARY_FJ = 0x9260 +gl._3DC_XY_AMD = 0x87fa +gl._3DC_X_AMD = 0x87f9 +gl.ACTIVE_ATTRIBUTES = 0x8b89 +gl.ACTIVE_ATTRIBUTE_MAX_LENGTH = 0x8b8a +gl.ACTIVE_PROGRAM_EXT = 0x8259 +gl.ACTIVE_TEXTURE = 0x84e0 +gl.ACTIVE_UNIFORMS = 0x8b86 +gl.ACTIVE_UNIFORM_MAX_LENGTH = 0x8b87 +gl.ALIASED_LINE_WIDTH_RANGE = 0x846e +gl.ALIASED_POINT_SIZE_RANGE = 0x846d +gl.ALL_COMPLETED_NV = 0x84f2 +gl.ALL_SHADER_BITS_EXT = 0xffffffff +gl.ALPHA = 0x1906 +gl.ALPHA16F_EXT = 0x881c +gl.ALPHA32F_EXT = 0x8816 +gl.ALPHA8_EXT = 0x803c +gl.ALPHA8_OES = 0x803c +gl.ALPHA_BITS = 0xd55 +gl.ALPHA_TEST_FUNC_QCOM = 0xbc1 +gl.ALPHA_TEST_QCOM = 0xbc0 +gl.ALPHA_TEST_REF_QCOM = 0xbc2 +gl.ALREADY_SIGNALED_APPLE = 0x911a +gl.ALWAYS = 0x207 +gl.AMD_compressed_3DC_texture = 0x1 +gl.AMD_compressed_ATC_texture = 0x1 +gl.AMD_performance_monitor = 0x1 +gl.AMD_program_binary_Z400 = 0x1 +gl.ANGLE_depth_texture = 0x1 +gl.ANGLE_framebuffer_blit = 0x1 +gl.ANGLE_framebuffer_multisample = 0x1 +gl.ANGLE_instanced_arrays = 0x1 +gl.ANGLE_pack_reverse_row_order = 0x1 +gl.ANGLE_program_binary = 0x1 +gl.ANGLE_texture_compression_dxt3 = 0x1 +gl.ANGLE_texture_compression_dxt5 = 0x1 +gl.ANGLE_texture_usage = 0x1 +gl.ANGLE_translated_shader_source = 0x1 +gl.ANY_SAMPLES_PASSED_CONSERVATIVE_EXT = 0x8d6a +gl.ANY_SAMPLES_PASSED_EXT = 0x8c2f +gl.APPLE_copy_texture_levels = 0x1 +gl.APPLE_framebuffer_multisample = 0x1 +gl.APPLE_rgb_422 = 0x1 +gl.APPLE_sync = 0x1 +gl.APPLE_texture_format_BGRA8888 = 0x1 +gl.APPLE_texture_max_level = 0x1 +gl.ARM_mali_program_binary = 0x1 +gl.ARM_mali_shader_binary = 0x1 +gl.ARM_rgba8 = 0x1 +gl.ARRAY_BUFFER = 0x8892 +gl.ARRAY_BUFFER_BINDING = 0x8894 +gl.ATC_RGBA_EXPLICIT_ALPHA_AMD = 0x8c93 +gl.ATC_RGBA_INTERPOLATED_ALPHA_AMD = 0x87ee +gl.ATC_RGB_AMD = 0x8c92 +gl.ATTACHED_SHADERS = 0x8b85 +gl.BACK = 0x405 +gl.BGRA8_EXT = 0x93a1 +gl.BGRA_EXT = 0x80e1 +gl.BGRA_IMG = 0x80e1 +gl.BINNING_CONTROL_HINT_QCOM = 0x8fb0 +gl.BLEND = 0xbe2 +gl.BLEND_COLOR = 0x8005 +gl.BLEND_DST_ALPHA = 0x80ca +gl.BLEND_DST_RGB = 0x80c8 +gl.BLEND_EQUATION = 0x8009 +gl.BLEND_EQUATION_ALPHA = 0x883d +gl.BLEND_EQUATION_RGB = 0x8009 +gl.BLEND_SRC_ALPHA = 0x80cb +gl.BLEND_SRC_RGB = 0x80c9 +gl.BLUE_BITS = 0xd54 +gl.BOOL = 0x8b56 +gl.BOOL_VEC2 = 0x8b57 +gl.BOOL_VEC3 = 0x8b58 +gl.BOOL_VEC4 = 0x8b59 +gl.BUFFER = 0x82e0 +gl.BUFFER_ACCESS_OES = 0x88bb +gl.BUFFER_MAPPED_OES = 0x88bc +gl.BUFFER_MAP_POINTER_OES = 0x88bd +gl.BUFFER_OBJECT_EXT = 0x9151 +gl.BUFFER_SIZE = 0x8764 +gl.BUFFER_USAGE = 0x8765 +gl.BYTE = 0x1400 +gl.CCW = 0x901 +gl.CLAMP_TO_BORDER_NV = 0x812d +gl.CLAMP_TO_EDGE = 0x812f +gl.COLOR_ATTACHMENT0 = 0x8ce0 +gl.COLOR_ATTACHMENT0_NV = 0x8ce0 +gl.COLOR_ATTACHMENT10_NV = 0x8cea +gl.COLOR_ATTACHMENT11_NV = 0x8ceb +gl.COLOR_ATTACHMENT12_NV = 0x8cec +gl.COLOR_ATTACHMENT13_NV = 0x8ced +gl.COLOR_ATTACHMENT14_NV = 0x8cee +gl.COLOR_ATTACHMENT15_NV = 0x8cef +gl.COLOR_ATTACHMENT1_NV = 0x8ce1 +gl.COLOR_ATTACHMENT2_NV = 0x8ce2 +gl.COLOR_ATTACHMENT3_NV = 0x8ce3 +gl.COLOR_ATTACHMENT4_NV = 0x8ce4 +gl.COLOR_ATTACHMENT5_NV = 0x8ce5 +gl.COLOR_ATTACHMENT6_NV = 0x8ce6 +gl.COLOR_ATTACHMENT7_NV = 0x8ce7 +gl.COLOR_ATTACHMENT8_NV = 0x8ce8 +gl.COLOR_ATTACHMENT9_NV = 0x8ce9 +gl.COLOR_ATTACHMENT_EXT = 0x90f0 +gl.COLOR_BUFFER_BIT = 0x4000 +gl.COLOR_BUFFER_BIT0_QCOM = 0x1 +gl.COLOR_BUFFER_BIT1_QCOM = 0x2 +gl.COLOR_BUFFER_BIT2_QCOM = 0x4 +gl.COLOR_BUFFER_BIT3_QCOM = 0x8 +gl.COLOR_BUFFER_BIT4_QCOM = 0x10 +gl.COLOR_BUFFER_BIT5_QCOM = 0x20 +gl.COLOR_BUFFER_BIT6_QCOM = 0x40 +gl.COLOR_BUFFER_BIT7_QCOM = 0x80 +gl.COLOR_CLEAR_VALUE = 0xc22 +gl.COLOR_EXT = 0x1800 +gl.COLOR_WRITEMASK = 0xc23 +gl.COMPARE_REF_TO_TEXTURE_EXT = 0x884e +gl.COMPILE_STATUS = 0x8b81 +gl.COMPRESSED_RGBA_ASTC_10x10_KHR = 0x93bb +gl.COMPRESSED_RGBA_ASTC_10x5_KHR = 0x93b8 +gl.COMPRESSED_RGBA_ASTC_10x6_KHR = 0x93b9 +gl.COMPRESSED_RGBA_ASTC_10x8_KHR = 0x93ba +gl.COMPRESSED_RGBA_ASTC_12x10_KHR = 0x93bc +gl.COMPRESSED_RGBA_ASTC_12x12_KHR = 0x93bd +gl.COMPRESSED_RGBA_ASTC_4x4_KHR = 0x93b0 +gl.COMPRESSED_RGBA_ASTC_5x4_KHR = 0x93b1 +gl.COMPRESSED_RGBA_ASTC_5x5_KHR = 0x93b2 +gl.COMPRESSED_RGBA_ASTC_6x5_KHR = 0x93b3 +gl.COMPRESSED_RGBA_ASTC_6x6_KHR = 0x93b4 +gl.COMPRESSED_RGBA_ASTC_8x5_KHR = 0x93b5 +gl.COMPRESSED_RGBA_ASTC_8x6_KHR = 0x93b6 +gl.COMPRESSED_RGBA_ASTC_8x8_KHR = 0x93b7 +gl.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG = 0x8c03 +gl.COMPRESSED_RGBA_PVRTC_2BPPV2_IMG = 0x9137 +gl.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG = 0x8c02 +gl.COMPRESSED_RGBA_PVRTC_4BPPV2_IMG = 0x9138 +gl.COMPRESSED_RGBA_S3TC_DXT1_EXT = 0x83f1 +gl.COMPRESSED_RGBA_S3TC_DXT3_ANGLE = 0x83f2 +gl.COMPRESSED_RGBA_S3TC_DXT5_ANGLE = 0x83f3 +gl.COMPRESSED_RGB_PVRTC_2BPPV1_IMG = 0x8c01 +gl.COMPRESSED_RGB_PVRTC_4BPPV1_IMG = 0x8c00 +gl.COMPRESSED_RGB_S3TC_DXT1_EXT = 0x83f0 +gl.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR = 0x93db +gl.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR = 0x93d8 +gl.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR = 0x93d9 +gl.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR = 0x93da +gl.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR = 0x93dc +gl.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR = 0x93dd +gl.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR = 0x93d0 +gl.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR = 0x93d1 +gl.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR = 0x93d2 +gl.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR = 0x93d3 +gl.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR = 0x93d4 +gl.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR = 0x93d5 +gl.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR = 0x93d6 +gl.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR = 0x93d7 +gl.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_NV = 0x8c4d +gl.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_NV = 0x8c4e +gl.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_NV = 0x8c4f +gl.COMPRESSED_SRGB_S3TC_DXT1_NV = 0x8c4c +gl.COMPRESSED_TEXTURE_FORMATS = 0x86a3 +gl.CONDITION_SATISFIED_APPLE = 0x911c +gl.CONSTANT_ALPHA = 0x8003 +gl.CONSTANT_COLOR = 0x8001 +gl.CONTEXT_FLAG_DEBUG_BIT = 0x2 +gl.CONTEXT_ROBUST_ACCESS_EXT = 0x90f3 +gl.COUNTER_RANGE_AMD = 0x8bc1 +gl.COUNTER_TYPE_AMD = 0x8bc0 +gl.COVERAGE_ALL_FRAGMENTS_NV = 0x8ed5 +gl.COVERAGE_ATTACHMENT_NV = 0x8ed2 +gl.COVERAGE_AUTOMATIC_NV = 0x8ed7 +gl.COVERAGE_BUFFERS_NV = 0x8ed3 +gl.COVERAGE_BUFFER_BIT_NV = 0x8000 +gl.COVERAGE_COMPONENT4_NV = 0x8ed1 +gl.COVERAGE_COMPONENT_NV = 0x8ed0 +gl.COVERAGE_EDGE_FRAGMENTS_NV = 0x8ed6 +gl.COVERAGE_SAMPLES_NV = 0x8ed4 +gl.CPU_OPTIMIZED_QCOM = 0x8fb1 +gl.CULL_FACE = 0xb44 +gl.CULL_FACE_MODE = 0xb45 +gl.CURRENT_PROGRAM = 0x8b8d +gl.CURRENT_QUERY_EXT = 0x8865 +gl.CURRENT_VERTEX_ATTRIB = 0x8626 +gl.CW = 0x900 +gl.DEBUG_CALLBACK_FUNCTION = 0x8244 +gl.DEBUG_CALLBACK_USER_PARAM = 0x8245 +gl.DEBUG_GROUP_STACK_DEPTH = 0x826d +gl.DEBUG_LOGGED_MESSAGES = 0x9145 +gl.DEBUG_NEXT_LOGGED_MESSAGE_LENGTH = 0x8243 +gl.DEBUG_OUTPUT = 0x92e0 +gl.DEBUG_OUTPUT_SYNCHRONOUS = 0x8242 +gl.DEBUG_SEVERITY_HIGH = 0x9146 +gl.DEBUG_SEVERITY_LOW = 0x9148 +gl.DEBUG_SEVERITY_MEDIUM = 0x9147 +gl.DEBUG_SEVERITY_NOTIFICATION = 0x826b +gl.DEBUG_SOURCE_API = 0x8246 +gl.DEBUG_SOURCE_APPLICATION = 0x824a +gl.DEBUG_SOURCE_OTHER = 0x824b +gl.DEBUG_SOURCE_SHADER_COMPILER = 0x8248 +gl.DEBUG_SOURCE_THIRD_PARTY = 0x8249 +gl.DEBUG_SOURCE_WINDOW_SYSTEM = 0x8247 +gl.DEBUG_TYPE_DEPRECATED_BEHAVIOR = 0x824d +gl.DEBUG_TYPE_ERROR = 0x824c +gl.DEBUG_TYPE_MARKER = 0x8268 +gl.DEBUG_TYPE_OTHER = 0x8251 +gl.DEBUG_TYPE_PERFORMANCE = 0x8250 +gl.DEBUG_TYPE_POP_GROUP = 0x826a +gl.DEBUG_TYPE_PORTABILITY = 0x824f +gl.DEBUG_TYPE_PUSH_GROUP = 0x8269 +gl.DEBUG_TYPE_UNDEFINED_BEHAVIOR = 0x824e +gl.DECR = 0x1e03 +gl.DECR_WRAP = 0x8508 +gl.DELETE_STATUS = 0x8b80 +gl.DEPTH24_STENCIL8_OES = 0x88f0 +gl.DEPTH_ATTACHMENT = 0x8d00 +gl.DEPTH_BITS = 0xd56 +gl.DEPTH_BUFFER_BIT = 0x100 +gl.DEPTH_BUFFER_BIT0_QCOM = 0x100 +gl.DEPTH_BUFFER_BIT1_QCOM = 0x200 +gl.DEPTH_BUFFER_BIT2_QCOM = 0x400 +gl.DEPTH_BUFFER_BIT3_QCOM = 0x800 +gl.DEPTH_BUFFER_BIT4_QCOM = 0x1000 +gl.DEPTH_BUFFER_BIT5_QCOM = 0x2000 +gl.DEPTH_BUFFER_BIT6_QCOM = 0x4000 +gl.DEPTH_BUFFER_BIT7_QCOM = 0x8000 +gl.DEPTH_CLEAR_VALUE = 0xb73 +gl.DEPTH_COMPONENT = 0x1902 +gl.DEPTH_COMPONENT16 = 0x81a5 +gl.DEPTH_COMPONENT16_NONLINEAR_NV = 0x8e2c +gl.DEPTH_COMPONENT16_OES = 0x81a5 +gl.DEPTH_COMPONENT24_OES = 0x81a6 +gl.DEPTH_COMPONENT32_OES = 0x81a7 +gl.DEPTH_EXT = 0x1801 +gl.DEPTH_FUNC = 0xb74 +gl.DEPTH_RANGE = 0xb70 +gl.DEPTH_STENCIL_OES = 0x84f9 +gl.DEPTH_TEST = 0xb71 +gl.DEPTH_WRITEMASK = 0xb72 +gl.DITHER = 0xbd0 +gl.DMP_shader_binary = 0x1 +gl.DONT_CARE = 0x1100 +gl.DRAW_BUFFER0_NV = 0x8825 +gl.DRAW_BUFFER10_NV = 0x882f +gl.DRAW_BUFFER11_NV = 0x8830 +gl.DRAW_BUFFER12_NV = 0x8831 +gl.DRAW_BUFFER13_NV = 0x8832 +gl.DRAW_BUFFER14_NV = 0x8833 +gl.DRAW_BUFFER15_NV = 0x8834 +gl.DRAW_BUFFER1_NV = 0x8826 +gl.DRAW_BUFFER2_NV = 0x8827 +gl.DRAW_BUFFER3_NV = 0x8828 +gl.DRAW_BUFFER4_NV = 0x8829 +gl.DRAW_BUFFER5_NV = 0x882a +gl.DRAW_BUFFER6_NV = 0x882b +gl.DRAW_BUFFER7_NV = 0x882c +gl.DRAW_BUFFER8_NV = 0x882d +gl.DRAW_BUFFER9_NV = 0x882e +gl.DRAW_BUFFER_EXT = 0xc01 +gl.DRAW_FRAMEBUFFER_ANGLE = 0x8ca9 +gl.DRAW_FRAMEBUFFER_APPLE = 0x8ca9 +gl.DRAW_FRAMEBUFFER_BINDING_ANGLE = 0x8ca6 +gl.DRAW_FRAMEBUFFER_BINDING_APPLE = 0x8ca6 +gl.DRAW_FRAMEBUFFER_BINDING_NV = 0x8ca6 +gl.DRAW_FRAMEBUFFER_NV = 0x8ca9 +gl.DST_ALPHA = 0x304 +gl.DST_COLOR = 0x306 +gl.DYNAMIC_DRAW = 0x88e8 +gl.ELEMENT_ARRAY_BUFFER = 0x8893 +gl.ELEMENT_ARRAY_BUFFER_BINDING = 0x8895 +gl.EQUAL = 0x202 +gl.ES_VERSION_2_0 = 0x1 +gl.ETC1_RGB8_OES = 0x8d64 +gl.ETC1_SRGB8_NV = 0x88ee +gl.EXTENSIONS = 0x1f03 +gl.EXT_blend_minmax = 0x1 +gl.EXT_color_buffer_half_float = 0x1 +gl.EXT_debug_label = 0x1 +gl.EXT_debug_marker = 0x1 +gl.EXT_discard_framebuffer = 0x1 +gl.EXT_map_buffer_range = 0x1 +gl.EXT_multi_draw_arrays = 0x1 +gl.EXT_multisampled_render_to_texture = 0x1 +gl.EXT_multiview_draw_buffers = 0x1 +gl.EXT_occlusion_query_boolean = 0x1 +gl.EXT_read_format_bgra = 0x1 +gl.EXT_robustness = 0x1 +gl.EXT_sRGB = 0x1 +gl.EXT_separate_shader_objects = 0x1 +gl.EXT_shader_framebuffer_fetch = 0x1 +gl.EXT_shader_texture_lod = 0x1 +gl.EXT_shadow_samplers = 0x1 +gl.EXT_texture_compression_dxt1 = 0x1 +gl.EXT_texture_filter_anisotropic = 0x1 +gl.EXT_texture_format_BGRA8888 = 0x1 +gl.EXT_texture_rg = 0x1 +gl.EXT_texture_storage = 0x1 +gl.EXT_texture_type_2_10_10_10_REV = 0x1 +gl.EXT_unpack_subimage = 0x1 +gl.FALSE = 0x0 +gl.FASTEST = 0x1101 +gl.FENCE_CONDITION_NV = 0x84f4 +gl.FENCE_STATUS_NV = 0x84f3 +gl.FIXED = 0x140c +gl.FJ_shader_binary_GCCSO = 0x1 +gl.FLOAT = 0x1406 +gl.FLOAT_MAT2 = 0x8b5a +gl.FLOAT_MAT3 = 0x8b5b +gl.FLOAT_MAT4 = 0x8b5c +gl.FLOAT_VEC2 = 0x8b50 +gl.FLOAT_VEC3 = 0x8b51 +gl.FLOAT_VEC4 = 0x8b52 +gl.FRAGMENT_SHADER = 0x8b30 +gl.FRAGMENT_SHADER_BIT_EXT = 0x2 +gl.FRAGMENT_SHADER_DERIVATIVE_HINT_OES = 0x8b8b +gl.FRAGMENT_SHADER_DISCARDS_SAMPLES_EXT = 0x8a52 +gl.FRAMEBUFFER = 0x8d40 +gl.FRAMEBUFFER_ATTACHMENT_ANGLE = 0x93a3 +gl.FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT = 0x8210 +gl.FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT = 0x8211 +gl.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME = 0x8cd1 +gl.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE = 0x8cd0 +gl.FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_OES = 0x8cd4 +gl.FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE = 0x8cd3 +gl.FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL = 0x8cd2 +gl.FRAMEBUFFER_ATTACHMENT_TEXTURE_SAMPLES_EXT = 0x8d6c +gl.FRAMEBUFFER_BINDING = 0x8ca6 +gl.FRAMEBUFFER_COMPLETE = 0x8cd5 +gl.FRAMEBUFFER_INCOMPLETE_ATTACHMENT = 0x8cd6 +gl.FRAMEBUFFER_INCOMPLETE_DIMENSIONS = 0x8cd9 +gl.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT = 0x8cd7 +gl.FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_ANGLE = 0x8d56 +gl.FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_APPLE = 0x8d56 +gl.FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT = 0x8d56 +gl.FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_IMG = 0x9134 +gl.FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_NV = 0x8d56 +gl.FRAMEBUFFER_UNDEFINED_OES = 0x8219 +gl.FRAMEBUFFER_UNSUPPORTED = 0x8cdd +gl.FRONT = 0x404 +gl.FRONT_AND_BACK = 0x408 +gl.FRONT_FACE = 0xb46 +gl.FUNC_ADD = 0x8006 +gl.FUNC_REVERSE_SUBTRACT = 0x800b +gl.FUNC_SUBTRACT = 0x800a +gl.GENERATE_MIPMAP_HINT = 0x8192 +gl.GEQUAL = 0x206 +gl.GPU_OPTIMIZED_QCOM = 0x8fb2 +gl.GREATER = 0x204 +gl.GREEN_BITS = 0xd53 +gl.GUILTY_CONTEXT_RESET_EXT = 0x8253 +gl.HALF_FLOAT_OES = 0x8d61 +gl.HIGH_FLOAT = 0x8df2 +gl.HIGH_INT = 0x8df5 +gl.IMG_multisampled_render_to_texture = 0x1 +gl.IMG_program_binary = 0x1 +gl.IMG_read_format = 0x1 +gl.IMG_shader_binary = 0x1 +gl.IMG_texture_compression_pvrtc = 0x1 +gl.IMG_texture_compression_pvrtc2 = 0x1 +gl.IMPLEMENTATION_COLOR_READ_FORMAT = 0x8b9b +gl.IMPLEMENTATION_COLOR_READ_TYPE = 0x8b9a +gl.INCR = 0x1e02 +gl.INCR_WRAP = 0x8507 +gl.INFO_LOG_LENGTH = 0x8b84 +gl.INNOCENT_CONTEXT_RESET_EXT = 0x8254 +gl.INT = 0x1404 +gl.INT_10_10_10_2_OES = 0x8df7 +gl.INT_VEC2 = 0x8b53 +gl.INT_VEC3 = 0x8b54 +gl.INT_VEC4 = 0x8b55 +gl.INVALID_ENUM = 0x500 +gl.INVALID_FRAMEBUFFER_OPERATION = 0x506 +gl.INVALID_OPERATION = 0x502 +gl.INVALID_VALUE = 0x501 +gl.INVERT = 0x150a +gl.KEEP = 0x1e00 +gl.KHR_debug = 0x1 +gl.KHR_texture_compression_astc_ldr = 0x1 +gl.LEQUAL = 0x203 +gl.LESS = 0x201 +gl.LINEAR = 0x2601 +gl.LINEAR_MIPMAP_LINEAR = 0x2703 +gl.LINEAR_MIPMAP_NEAREST = 0x2701 +gl.LINES = 0x1 +gl.LINE_LOOP = 0x2 +gl.LINE_STRIP = 0x3 +gl.LINE_WIDTH = 0xb21 +gl.LINK_STATUS = 0x8b82 +gl.LOSE_CONTEXT_ON_RESET_EXT = 0x8252 +gl.LOW_FLOAT = 0x8df0 +gl.LOW_INT = 0x8df3 +gl.LUMINANCE = 0x1909 +gl.LUMINANCE16F_EXT = 0x881e +gl.LUMINANCE32F_EXT = 0x8818 +gl.LUMINANCE4_ALPHA4_OES = 0x8043 +gl.LUMINANCE8_ALPHA8_EXT = 0x8045 +gl.LUMINANCE8_ALPHA8_OES = 0x8045 +gl.LUMINANCE8_EXT = 0x8040 +gl.LUMINANCE8_OES = 0x8040 +gl.LUMINANCE_ALPHA = 0x190a +gl.LUMINANCE_ALPHA16F_EXT = 0x881f +gl.LUMINANCE_ALPHA32F_EXT = 0x8819 +gl.MALI_PROGRAM_BINARY_ARM = 0x8f61 +gl.MALI_SHADER_BINARY_ARM = 0x8f60 +gl.MAP_FLUSH_EXPLICIT_BIT_EXT = 0x10 +gl.MAP_INVALIDATE_BUFFER_BIT_EXT = 0x8 +gl.MAP_INVALIDATE_RANGE_BIT_EXT = 0x4 +gl.MAP_READ_BIT_EXT = 0x1 +gl.MAP_UNSYNCHRONIZED_BIT_EXT = 0x20 +gl.MAP_WRITE_BIT_EXT = 0x2 +gl.MAX_3D_TEXTURE_SIZE_OES = 0x8073 +gl.MAX_COLOR_ATTACHMENTS_NV = 0x8cdf +gl.MAX_COMBINED_TEXTURE_IMAGE_UNITS = 0x8b4d +gl.MAX_CUBE_MAP_TEXTURE_SIZE = 0x851c +gl.MAX_DEBUG_GROUP_STACK_DEPTH = 0x826c +gl.MAX_DEBUG_LOGGED_MESSAGES = 0x9144 +gl.MAX_DEBUG_MESSAGE_LENGTH = 0x9143 +gl.MAX_DRAW_BUFFERS_NV = 0x8824 +gl.MAX_EXT = 0x8008 +gl.MAX_FRAGMENT_UNIFORM_VECTORS = 0x8dfd +gl.MAX_LABEL_LENGTH = 0x82e8 +gl.MAX_MULTIVIEW_BUFFERS_EXT = 0x90f2 +gl.MAX_RENDERBUFFER_SIZE = 0x84e8 +gl.MAX_SAMPLES_ANGLE = 0x8d57 +gl.MAX_SAMPLES_APPLE = 0x8d57 +gl.MAX_SAMPLES_EXT = 0x8d57 +gl.MAX_SAMPLES_IMG = 0x9135 +gl.MAX_SAMPLES_NV = 0x8d57 +gl.MAX_SERVER_WAIT_TIMEOUT_APPLE = 0x9111 +gl.MAX_TEXTURE_IMAGE_UNITS = 0x8872 +gl.MAX_TEXTURE_MAX_ANISOTROPY_EXT = 0x84ff +gl.MAX_TEXTURE_SIZE = 0xd33 +gl.MAX_VARYING_VECTORS = 0x8dfc +gl.MAX_VERTEX_ATTRIBS = 0x8869 +gl.MAX_VERTEX_TEXTURE_IMAGE_UNITS = 0x8b4c +gl.MAX_VERTEX_UNIFORM_VECTORS = 0x8dfb +gl.MAX_VIEWPORT_DIMS = 0xd3a +gl.MEDIUM_FLOAT = 0x8df1 +gl.MEDIUM_INT = 0x8df4 +gl.MIN_EXT = 0x8007 +gl.MIRRORED_REPEAT = 0x8370 +gl.MULTISAMPLE_BUFFER_BIT0_QCOM = 0x1000000 +gl.MULTISAMPLE_BUFFER_BIT1_QCOM = 0x2000000 +gl.MULTISAMPLE_BUFFER_BIT2_QCOM = 0x4000000 +gl.MULTISAMPLE_BUFFER_BIT3_QCOM = 0x8000000 +gl.MULTISAMPLE_BUFFER_BIT4_QCOM = 0x10000000 +gl.MULTISAMPLE_BUFFER_BIT5_QCOM = 0x20000000 +gl.MULTISAMPLE_BUFFER_BIT6_QCOM = 0x40000000 +gl.MULTISAMPLE_BUFFER_BIT7_QCOM = 0x80000000 +gl.MULTIVIEW_EXT = 0x90f1 +gl.NEAREST = 0x2600 +gl.NEAREST_MIPMAP_LINEAR = 0x2702 +gl.NEAREST_MIPMAP_NEAREST = 0x2700 +gl.NEVER = 0x200 +gl.NICEST = 0x1102 +gl.NONE = 0x0 +gl.NOTEQUAL = 0x205 +gl.NO_ERROR = 0x0 +gl.NO_RESET_NOTIFICATION_EXT = 0x8261 +gl.NUM_COMPRESSED_TEXTURE_FORMATS = 0x86a2 +gl.NUM_PROGRAM_BINARY_FORMATS_OES = 0x87fe +gl.NUM_SHADER_BINARY_FORMATS = 0x8df9 +gl.NV_coverage_sample = 0x1 +gl.NV_depth_nonlinear = 0x1 +gl.NV_draw_buffers = 0x1 +gl.NV_draw_instanced = 0x1 +gl.NV_fbo_color_attachments = 0x1 +gl.NV_fence = 0x1 +gl.NV_framebuffer_blit = 0x1 +gl.NV_framebuffer_multisample = 0x1 +gl.NV_generate_mipmap_sRGB = 0x1 +gl.NV_instanced_arrays = 0x1 +gl.NV_read_buffer = 0x1 +gl.NV_read_buffer_front = 0x1 +gl.NV_read_depth = 0x1 +gl.NV_read_depth_stencil = 0x1 +gl.NV_read_stencil = 0x1 +gl.NV_sRGB_formats = 0x1 +gl.NV_shadow_samplers_array = 0x1 +gl.NV_shadow_samplers_cube = 0x1 +gl.NV_texture_border_clamp = 0x1 +gl.NV_texture_compression_s3tc_update = 0x1 +gl.NV_texture_npot_2D_mipmap = 0x1 +gl.OBJECT_TYPE_APPLE = 0x9112 +gl.OES_EGL_image = 0x1 +gl.OES_EGL_image_external = 0x1 +gl.OES_compressed_ETC1_RGB8_texture = 0x1 +gl.OES_compressed_paletted_texture = 0x1 +gl.OES_depth24 = 0x1 +gl.OES_depth32 = 0x1 +gl.OES_depth_texture = 0x1 +gl.OES_element_index_uint = 0x1 +gl.OES_fbo_render_mipmap = 0x1 +gl.OES_fragment_precision_high = 0x1 +gl.OES_get_program_binary = 0x1 +gl.OES_mapbuffer = 0x1 +gl.OES_packed_depth_stencil = 0x1 +gl.OES_required_internalformat = 0x1 +gl.OES_rgb8_rgba8 = 0x1 +gl.OES_standard_derivatives = 0x1 +gl.OES_stencil1 = 0x1 +gl.OES_stencil4 = 0x1 +gl.OES_surfaceless_context = 0x1 +gl.OES_texture_3D = 0x1 +gl.OES_texture_float = 0x1 +gl.OES_texture_float_linear = 0x1 +gl.OES_texture_half_float = 0x1 +gl.OES_texture_half_float_linear = 0x1 +gl.OES_texture_npot = 0x1 +gl.OES_vertex_array_object = 0x1 +gl.OES_vertex_half_float = 0x1 +gl.OES_vertex_type_10_10_10_2 = 0x1 +gl.ONE = 0x1 +gl.ONE_MINUS_CONSTANT_ALPHA = 0x8004 +gl.ONE_MINUS_CONSTANT_COLOR = 0x8002 +gl.ONE_MINUS_DST_ALPHA = 0x305 +gl.ONE_MINUS_DST_COLOR = 0x307 +gl.ONE_MINUS_SRC_ALPHA = 0x303 +gl.ONE_MINUS_SRC_COLOR = 0x301 +gl.OUT_OF_MEMORY = 0x505 +gl.PACK_ALIGNMENT = 0xd05 +gl.PACK_REVERSE_ROW_ORDER_ANGLE = 0x93a4 +gl.PALETTE4_R5_G6_B5_OES = 0x8b92 +gl.PALETTE4_RGB5_A1_OES = 0x8b94 +gl.PALETTE4_RGB8_OES = 0x8b90 +gl.PALETTE4_RGBA4_OES = 0x8b93 +gl.PALETTE4_RGBA8_OES = 0x8b91 +gl.PALETTE8_R5_G6_B5_OES = 0x8b97 +gl.PALETTE8_RGB5_A1_OES = 0x8b99 +gl.PALETTE8_RGB8_OES = 0x8b95 +gl.PALETTE8_RGBA4_OES = 0x8b98 +gl.PALETTE8_RGBA8_OES = 0x8b96 +gl.PERCENTAGE_AMD = 0x8bc3 +gl.PERFMON_GLOBAL_MODE_QCOM = 0x8fa0 +gl.PERFMON_RESULT_AMD = 0x8bc6 +gl.PERFMON_RESULT_AVAILABLE_AMD = 0x8bc4 +gl.PERFMON_RESULT_SIZE_AMD = 0x8bc5 +gl.POINTS = 0x0 +gl.POLYGON_OFFSET_FACTOR = 0x8038 +gl.POLYGON_OFFSET_FILL = 0x8037 +gl.POLYGON_OFFSET_UNITS = 0x2a00 +gl.PROGRAM = 0x82e2 +gl.PROGRAM_BINARY_ANGLE = 0x93a6 +gl.PROGRAM_BINARY_FORMATS_OES = 0x87ff +gl.PROGRAM_BINARY_LENGTH_OES = 0x8741 +gl.PROGRAM_OBJECT_EXT = 0x8b40 +gl.PROGRAM_PIPELINE_BINDING_EXT = 0x825a +gl.PROGRAM_PIPELINE_OBJECT_EXT = 0x8a4f +gl.PROGRAM_SEPARABLE_EXT = 0x8258 +gl.QCOM_alpha_test = 0x1 +gl.QCOM_binning_control = 0x1 +gl.QCOM_driver_control = 0x1 +gl.QCOM_extended_get = 0x1 +gl.QCOM_extended_get2 = 0x1 +gl.QCOM_perfmon_global_mode = 0x1 +gl.QCOM_tiled_rendering = 0x1 +gl.QCOM_writeonly_rendering = 0x1 +gl.QUERY = 0x82e3 +gl.QUERY_OBJECT_EXT = 0x9153 +gl.QUERY_RESULT_AVAILABLE_EXT = 0x8867 +gl.QUERY_RESULT_EXT = 0x8866 +gl.R16F_EXT = 0x822d +gl.R32F_EXT = 0x822e +gl.R8_EXT = 0x8229 +gl.READ_BUFFER_EXT = 0xc02 +gl.READ_BUFFER_NV = 0xc02 +gl.READ_FRAMEBUFFER_ANGLE = 0x8ca8 +gl.READ_FRAMEBUFFER_APPLE = 0x8ca8 +gl.READ_FRAMEBUFFER_BINDING_ANGLE = 0x8caa +gl.READ_FRAMEBUFFER_BINDING_APPLE = 0x8caa +gl.READ_FRAMEBUFFER_BINDING_NV = 0x8caa +gl.READ_FRAMEBUFFER_NV = 0x8ca8 +gl.RED_BITS = 0xd52 +gl.RED_EXT = 0x1903 +gl.RENDERBUFFER = 0x8d41 +gl.RENDERBUFFER_ALPHA_SIZE = 0x8d53 +gl.RENDERBUFFER_BINDING = 0x8ca7 +gl.RENDERBUFFER_BLUE_SIZE = 0x8d52 +gl.RENDERBUFFER_DEPTH_SIZE = 0x8d54 +gl.RENDERBUFFER_GREEN_SIZE = 0x8d51 +gl.RENDERBUFFER_HEIGHT = 0x8d43 +gl.RENDERBUFFER_INTERNAL_FORMAT = 0x8d44 +gl.RENDERBUFFER_RED_SIZE = 0x8d50 +gl.RENDERBUFFER_SAMPLES_ANGLE = 0x8cab +gl.RENDERBUFFER_SAMPLES_APPLE = 0x8cab +gl.RENDERBUFFER_SAMPLES_EXT = 0x8cab +gl.RENDERBUFFER_SAMPLES_IMG = 0x9133 +gl.RENDERBUFFER_SAMPLES_NV = 0x8cab +gl.RENDERBUFFER_STENCIL_SIZE = 0x8d55 +gl.RENDERBUFFER_WIDTH = 0x8d42 +gl.RENDERER = 0x1f01 +gl.RENDER_DIRECT_TO_FRAMEBUFFER_QCOM = 0x8fb3 +gl.REPEAT = 0x2901 +gl.REPLACE = 0x1e01 +gl.REQUIRED_TEXTURE_IMAGE_UNITS_OES = 0x8d68 +gl.RESET_NOTIFICATION_STRATEGY_EXT = 0x8256 +gl.RG16F_EXT = 0x822f +gl.RG32F_EXT = 0x8230 +gl.RG8_EXT = 0x822b +gl.RGB = 0x1907 +gl.RGB10_A2_EXT = 0x8059 +gl.RGB10_EXT = 0x8052 +gl.RGB16F_EXT = 0x881b +gl.RGB32F_EXT = 0x8815 +gl.RGB565 = 0x8d62 +gl.RGB565_OES = 0x8d62 +gl.RGB5_A1 = 0x8057 +gl.RGB5_A1_OES = 0x8057 +gl.RGB8_OES = 0x8051 +gl.RGBA = 0x1908 +gl.RGBA16F_EXT = 0x881a +gl.RGBA32F_EXT = 0x8814 +gl.RGBA4 = 0x8056 +gl.RGBA4_OES = 0x8056 +gl.RGBA8_OES = 0x8058 +gl.RGB_422_APPLE = 0x8a1f +gl.RG_EXT = 0x8227 +gl.SAMPLER = 0x82e6 +gl.SAMPLER_2D = 0x8b5e +gl.SAMPLER_2D_ARRAY_SHADOW_NV = 0x8dc4 +gl.SAMPLER_2D_SHADOW_EXT = 0x8b62 +gl.SAMPLER_3D_OES = 0x8b5f +gl.SAMPLER_CUBE = 0x8b60 +gl.SAMPLER_CUBE_SHADOW_NV = 0x8dc5 +gl.SAMPLER_EXTERNAL_OES = 0x8d66 +gl.SAMPLES = 0x80a9 +gl.SAMPLE_ALPHA_TO_COVERAGE = 0x809e +gl.SAMPLE_BUFFERS = 0x80a8 +gl.SAMPLE_COVERAGE = 0x80a0 +gl.SAMPLE_COVERAGE_INVERT = 0x80ab +gl.SAMPLE_COVERAGE_VALUE = 0x80aa +gl.SCISSOR_BOX = 0xc10 +gl.SCISSOR_TEST = 0xc11 +gl.SGX_BINARY_IMG = 0x8c0a +gl.SGX_PROGRAM_BINARY_IMG = 0x9130 +gl.SHADER = 0x82e1 +gl.SHADER_BINARY_DMP = 0x9250 +gl.SHADER_BINARY_FORMATS = 0x8df8 +gl.SHADER_BINARY_VIV = 0x8fc4 +gl.SHADER_COMPILER = 0x8dfa +gl.SHADER_OBJECT_EXT = 0x8b48 +gl.SHADER_SOURCE_LENGTH = 0x8b88 +gl.SHADER_TYPE = 0x8b4f +gl.SHADING_LANGUAGE_VERSION = 0x8b8c +gl.SHORT = 0x1402 +gl.SIGNALED_APPLE = 0x9119 +gl.SLUMINANCE8_ALPHA8_NV = 0x8c45 +gl.SLUMINANCE8_NV = 0x8c47 +gl.SLUMINANCE_ALPHA_NV = 0x8c44 +gl.SLUMINANCE_NV = 0x8c46 +gl.SRC_ALPHA = 0x302 +gl.SRC_ALPHA_SATURATE = 0x308 +gl.SRC_COLOR = 0x300 +gl.SRGB8_ALPHA8_EXT = 0x8c43 +gl.SRGB8_NV = 0x8c41 +gl.SRGB_ALPHA_EXT = 0x8c42 +gl.SRGB_EXT = 0x8c40 +gl.STACK_OVERFLOW = 0x503 +gl.STACK_UNDERFLOW = 0x504 +gl.STATE_RESTORE = 0x8bdc +gl.STATIC_DRAW = 0x88e4 +gl.STENCIL_ATTACHMENT = 0x8d20 +gl.STENCIL_BACK_FAIL = 0x8801 +gl.STENCIL_BACK_FUNC = 0x8800 +gl.STENCIL_BACK_PASS_DEPTH_FAIL = 0x8802 +gl.STENCIL_BACK_PASS_DEPTH_PASS = 0x8803 +gl.STENCIL_BACK_REF = 0x8ca3 +gl.STENCIL_BACK_VALUE_MASK = 0x8ca4 +gl.STENCIL_BACK_WRITEMASK = 0x8ca5 +gl.STENCIL_BITS = 0xd57 +gl.STENCIL_BUFFER_BIT = 0x400 +gl.STENCIL_BUFFER_BIT0_QCOM = 0x10000 +gl.STENCIL_BUFFER_BIT1_QCOM = 0x20000 +gl.STENCIL_BUFFER_BIT2_QCOM = 0x40000 +gl.STENCIL_BUFFER_BIT3_QCOM = 0x80000 +gl.STENCIL_BUFFER_BIT4_QCOM = 0x100000 +gl.STENCIL_BUFFER_BIT5_QCOM = 0x200000 +gl.STENCIL_BUFFER_BIT6_QCOM = 0x400000 +gl.STENCIL_BUFFER_BIT7_QCOM = 0x800000 +gl.STENCIL_CLEAR_VALUE = 0xb91 +gl.STENCIL_EXT = 0x1802 +gl.STENCIL_FAIL = 0xb94 +gl.STENCIL_FUNC = 0xb92 +gl.STENCIL_INDEX1_OES = 0x8d46 +gl.STENCIL_INDEX4_OES = 0x8d47 +gl.STENCIL_INDEX8 = 0x8d48 +gl.STENCIL_PASS_DEPTH_FAIL = 0xb95 +gl.STENCIL_PASS_DEPTH_PASS = 0xb96 +gl.STENCIL_REF = 0xb97 +gl.STENCIL_TEST = 0xb90 +gl.STENCIL_VALUE_MASK = 0xb93 +gl.STENCIL_WRITEMASK = 0xb98 +gl.STREAM_DRAW = 0x88e0 +gl.SUBPIXEL_BITS = 0xd50 +gl.SYNC_CONDITION_APPLE = 0x9113 +gl.SYNC_FENCE_APPLE = 0x9116 +gl.SYNC_FLAGS_APPLE = 0x9115 +gl.SYNC_FLUSH_COMMANDS_BIT_APPLE = 0x1 +gl.SYNC_GPU_COMMANDS_COMPLETE_APPLE = 0x9117 +gl.SYNC_OBJECT_APPLE = 0x8a53 +gl.SYNC_STATUS_APPLE = 0x9114 +gl.TEXTURE = 0x1702 +gl.TEXTURE0 = 0x84c0 +gl.TEXTURE1 = 0x84c1 +gl.TEXTURE10 = 0x84ca +gl.TEXTURE11 = 0x84cb +gl.TEXTURE12 = 0x84cc +gl.TEXTURE13 = 0x84cd +gl.TEXTURE14 = 0x84ce +gl.TEXTURE15 = 0x84cf +gl.TEXTURE16 = 0x84d0 +gl.TEXTURE17 = 0x84d1 +gl.TEXTURE18 = 0x84d2 +gl.TEXTURE19 = 0x84d3 +gl.TEXTURE2 = 0x84c2 +gl.TEXTURE20 = 0x84d4 +gl.TEXTURE21 = 0x84d5 +gl.TEXTURE22 = 0x84d6 +gl.TEXTURE23 = 0x84d7 +gl.TEXTURE24 = 0x84d8 +gl.TEXTURE25 = 0x84d9 +gl.TEXTURE26 = 0x84da +gl.TEXTURE27 = 0x84db +gl.TEXTURE28 = 0x84dc +gl.TEXTURE29 = 0x84dd +gl.TEXTURE3 = 0x84c3 +gl.TEXTURE30 = 0x84de +gl.TEXTURE31 = 0x84df +gl.TEXTURE4 = 0x84c4 +gl.TEXTURE5 = 0x84c5 +gl.TEXTURE6 = 0x84c6 +gl.TEXTURE7 = 0x84c7 +gl.TEXTURE8 = 0x84c8 +gl.TEXTURE9 = 0x84c9 +gl.TEXTURE_2D = 0xde1 +gl.TEXTURE_3D_OES = 0x806f +gl.TEXTURE_BINDING_2D = 0x8069 +gl.TEXTURE_BINDING_3D_OES = 0x806a +gl.TEXTURE_BINDING_CUBE_MAP = 0x8514 +gl.TEXTURE_BINDING_EXTERNAL_OES = 0x8d67 +gl.TEXTURE_BORDER_COLOR_NV = 0x1004 +gl.TEXTURE_COMPARE_FUNC_EXT = 0x884d +gl.TEXTURE_COMPARE_MODE_EXT = 0x884c +gl.TEXTURE_CUBE_MAP = 0x8513 +gl.TEXTURE_CUBE_MAP_NEGATIVE_X = 0x8516 +gl.TEXTURE_CUBE_MAP_NEGATIVE_Y = 0x8518 +gl.TEXTURE_CUBE_MAP_NEGATIVE_Z = 0x851a +gl.TEXTURE_CUBE_MAP_POSITIVE_X = 0x8515 +gl.TEXTURE_CUBE_MAP_POSITIVE_Y = 0x8517 +gl.TEXTURE_CUBE_MAP_POSITIVE_Z = 0x8519 +gl.TEXTURE_DEPTH_QCOM = 0x8bd4 +gl.TEXTURE_EXTERNAL_OES = 0x8d65 +gl.TEXTURE_FORMAT_QCOM = 0x8bd6 +gl.TEXTURE_HEIGHT_QCOM = 0x8bd3 +gl.TEXTURE_IMAGE_VALID_QCOM = 0x8bd8 +gl.TEXTURE_IMMUTABLE_FORMAT_EXT = 0x912f +gl.TEXTURE_INTERNAL_FORMAT_QCOM = 0x8bd5 +gl.TEXTURE_MAG_FILTER = 0x2800 +gl.TEXTURE_MAX_ANISOTROPY_EXT = 0x84fe +gl.TEXTURE_MAX_LEVEL_APPLE = 0x813d +gl.TEXTURE_MIN_FILTER = 0x2801 +gl.TEXTURE_NUM_LEVELS_QCOM = 0x8bd9 +gl.TEXTURE_OBJECT_VALID_QCOM = 0x8bdb +gl.TEXTURE_SAMPLES_IMG = 0x9136 +gl.TEXTURE_TARGET_QCOM = 0x8bda +gl.TEXTURE_TYPE_QCOM = 0x8bd7 +gl.TEXTURE_USAGE_ANGLE = 0x93a2 +gl.TEXTURE_WIDTH_QCOM = 0x8bd2 +gl.TEXTURE_WRAP_R_OES = 0x8072 +gl.TEXTURE_WRAP_S = 0x2802 +gl.TEXTURE_WRAP_T = 0x2803 +gl.TIMEOUT_EXPIRED_APPLE = 0x911b +gl.TIMEOUT_IGNORED_APPLE = 0xffffffffffffffff +gl.TRANSLATED_SHADER_SOURCE_LENGTH_ANGLE = 0x93a0 +gl.TRIANGLES = 0x4 +gl.TRIANGLE_FAN = 0x6 +gl.TRIANGLE_STRIP = 0x5 +gl.TRUE = 0x1 +gl.UNKNOWN_CONTEXT_RESET_EXT = 0x8255 +gl.UNPACK_ALIGNMENT = 0xcf5 +gl.UNPACK_ROW_LENGTH = 0xcf2 +gl.UNPACK_SKIP_PIXELS = 0xcf4 +gl.UNPACK_SKIP_ROWS = 0xcf3 +gl.UNSIGNALED_APPLE = 0x9118 +gl.UNSIGNED_BYTE = 0x1401 +gl.UNSIGNED_INT = 0x1405 +gl.UNSIGNED_INT64_AMD = 0x8bc2 +gl.UNSIGNED_INT_10_10_10_2_OES = 0x8df6 +gl.UNSIGNED_INT_24_8_OES = 0x84fa +gl.UNSIGNED_INT_2_10_10_10_REV_EXT = 0x8368 +gl.UNSIGNED_NORMALIZED_EXT = 0x8c17 +gl.UNSIGNED_SHORT = 0x1403 +gl.UNSIGNED_SHORT_1_5_5_5_REV_EXT = 0x8366 +gl.UNSIGNED_SHORT_4_4_4_4 = 0x8033 +gl.UNSIGNED_SHORT_4_4_4_4_REV_EXT = 0x8365 +gl.UNSIGNED_SHORT_4_4_4_4_REV_IMG = 0x8365 +gl.UNSIGNED_SHORT_5_5_5_1 = 0x8034 +gl.UNSIGNED_SHORT_5_6_5 = 0x8363 +gl.UNSIGNED_SHORT_8_8_APPLE = 0x85ba +gl.UNSIGNED_SHORT_8_8_REV_APPLE = 0x85bb +gl.VALIDATE_STATUS = 0x8b83 +gl.VENDOR = 0x1f00 +gl.VERSION = 0x1f02 +gl.VERTEX_ARRAY_BINDING_OES = 0x85b5 +gl.VERTEX_ARRAY_OBJECT_EXT = 0x9154 +gl.VERTEX_ATTRIB_ARRAY_BUFFER_BINDING = 0x889f +gl.VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE = 0x88fe +gl.VERTEX_ATTRIB_ARRAY_DIVISOR_NV = 0x88fe +gl.VERTEX_ATTRIB_ARRAY_ENABLED = 0x8622 +gl.VERTEX_ATTRIB_ARRAY_NORMALIZED = 0x886a +gl.VERTEX_ATTRIB_ARRAY_POINTER = 0x8645 +gl.VERTEX_ATTRIB_ARRAY_SIZE = 0x8623 +gl.VERTEX_ATTRIB_ARRAY_STRIDE = 0x8624 +gl.VERTEX_ATTRIB_ARRAY_TYPE = 0x8625 +gl.VERTEX_SHADER = 0x8b31 +gl.VERTEX_SHADER_BIT_EXT = 0x1 +gl.VIEWPORT = 0xba2 +gl.VIV_shader_binary = 0x1 +gl.WAIT_FAILED_APPLE = 0x911d +gl.WRITEONLY_RENDERING_QCOM = 0x8823 +gl.WRITE_ONLY_OES = 0x88b9 +gl.Z400_BINARY_AMD = 0x8740 +gl.ZERO = 0x0 From 3e052d55257a07289d29f99e93cc5f4d2091fa28 Mon Sep 17 00:00:00 2001 From: James Chen Date: Tue, 25 Jun 2013 23:21:06 +0800 Subject: [PATCH 04/15] issue #2325: Fixing an issue that Xcode doesn't rebuild app when source file updated in dependent static library. --- .../contents.xcworkspacedata | 18 ++++---- .../project.pbxproj | 44 +++++++++---------- .../HelloCpp.xcodeproj/project.pbxproj | 16 ++----- .../SimpleGame.xcodeproj/project.pbxproj | 27 ++++++------ .../project.pbxproj.REMOVED.git-id | 2 +- .../CocosDragonJS.xcodeproj/project.pbxproj | 10 ++--- .../CrystalCraze.xcodeproj/project.pbxproj | 10 ++--- .../MoonWarriors.xcodeproj/project.pbxproj | 10 ++--- .../TestJavascript.xcodeproj/project.pbxproj | 10 ++--- .../project.pbxproj | 10 ++--- .../HelloLua.xcodeproj/project.pbxproj | 12 ++--- .../TestLua.xcodeproj/project.pbxproj | 12 ++--- 12 files changed, 85 insertions(+), 96 deletions(-) diff --git a/cocos2d-ios.xcworkspace/contents.xcworkspacedata b/cocos2d-ios.xcworkspace/contents.xcworkspacedata index 1373e1b706..455cfdbac8 100644 --- a/cocos2d-ios.xcworkspace/contents.xcworkspacedata +++ b/cocos2d-ios.xcworkspace/contents.xcworkspacedata @@ -36,6 +36,9 @@ + + @@ -45,14 +48,17 @@ - - + + + + @@ -62,12 +68,6 @@ - - - - diff --git a/samples/Cpp/AssetsManagerTest/proj.ios/AssetsManagerTest.xcodeproj/project.pbxproj b/samples/Cpp/AssetsManagerTest/proj.ios/AssetsManagerTest.xcodeproj/project.pbxproj index 37c00a1cfc..e312c3af00 100644 --- a/samples/Cpp/AssetsManagerTest/proj.ios/AssetsManagerTest.xcodeproj/project.pbxproj +++ b/samples/Cpp/AssetsManagerTest/proj.ios/AssetsManagerTest.xcodeproj/project.pbxproj @@ -7,6 +7,11 @@ objects = { /* Begin PBXBuildFile section */ + 1A6B059A177828E700FFE52B /* libchipmunk.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1A6B0595177828E700FFE52B /* libchipmunk.a */; }; + 1A6B059B177828E700FFE52B /* libcocos2dx.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1A6B0596177828E700FFE52B /* libcocos2dx.a */; }; + 1A6B059C177828E700FFE52B /* libCocosDenshion.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1A6B0597177828E700FFE52B /* libCocosDenshion.a */; }; + 1A6B059D177828E700FFE52B /* libextensions.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1A6B0598177828E700FFE52B /* libextensions.a */; }; + 1A6B059E177828E700FFE52B /* libjsbindings.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1A6B0599177828E700FFE52B /* libjsbindings.a */; }; 1A6B05B81778293600FFE52B /* jsb.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A6B05A01778291500FFE52B /* jsb.js */; }; 1A6B05B91778293600FFE52B /* jsb_chipmunk.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A6B05A11778291500FFE52B /* jsb_chipmunk.js */; }; 1A6B05BA1778293600FFE52B /* jsb_chipmunk_constants.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A6B05A21778291500FFE52B /* jsb_chipmunk_constants.js */; }; @@ -45,15 +50,14 @@ 46A212B316D4A43400723F2B /* main.js in Resources */ = {isa = PBXBuildFile; fileRef = 46A212B116D4A41700723F2B /* main.js */; }; 46A212BE16D4A4C000723F2B /* myApp.js in Resources */ = {isa = PBXBuildFile; fileRef = 46A212BC16D4A4B100723F2B /* myApp.js */; }; 46A2146116D4B04A00723F2B /* Background.png in Resources */ = {isa = PBXBuildFile; fileRef = 46A2146016D4B04A00723F2B /* Background.png */; }; - A0C2189D1779272900BE78B5 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = A0C2189C1779272900BE78B5 /* Default-568h@2x.png */; }; - A0F3A9B8177905F600CF0EB6 /* libchipmunk.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A0F3A9B3177905F600CF0EB6 /* libchipmunk.a */; }; - A0F3A9B9177905F600CF0EB6 /* libcocos2dx.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A0F3A9B4177905F600CF0EB6 /* libcocos2dx.a */; }; - A0F3A9BA177905F600CF0EB6 /* libCocosDenshion.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A0F3A9B5177905F600CF0EB6 /* libCocosDenshion.a */; }; - A0F3A9BB177905F600CF0EB6 /* libextensions.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A0F3A9B6177905F600CF0EB6 /* libextensions.a */; }; - A0F3A9BC177905F600CF0EB6 /* libjsbindings.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A0F3A9B7177905F600CF0EB6 /* libjsbindings.a */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ + 1A6B0595177828E700FFE52B /* libchipmunk.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; name = libchipmunk.a; path = "libchipmunk.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 1A6B0596177828E700FFE52B /* libcocos2dx.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; name = libcocos2dx.a; path = "libcocos2dx.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 1A6B0597177828E700FFE52B /* libCocosDenshion.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; name = libCocosDenshion.a; path = "libCocosDenshion.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 1A6B0598177828E700FFE52B /* libextensions.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; name = libextensions.a; path = "libextensions.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 1A6B0599177828E700FFE52B /* libjsbindings.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; name = libjsbindings.a; path = "libjsbindings.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 1A6B05A01778291500FFE52B /* jsb.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = jsb.js; sourceTree = ""; }; 1A6B05A11778291500FFE52B /* jsb_chipmunk.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = jsb_chipmunk.js; sourceTree = ""; }; 1A6B05A21778291500FFE52B /* jsb_chipmunk_constants.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = jsb_chipmunk_constants.js; sourceTree = ""; }; @@ -95,12 +99,6 @@ 46A212B116D4A41700723F2B /* main.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = main.js; sourceTree = ""; }; 46A212BC16D4A4B100723F2B /* myApp.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = myApp.js; sourceTree = ""; }; 46A2146016D4B04A00723F2B /* Background.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Background.png; sourceTree = ""; }; - A0C2189C1779272900BE78B5 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = ""; }; - A0F3A9B3177905F600CF0EB6 /* libchipmunk.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libchipmunk.a; path = "../../../../external/chipmunk/proj.ios/build/Release-iphoneos/libchipmunk.a"; sourceTree = ""; }; - A0F3A9B4177905F600CF0EB6 /* libcocos2dx.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libcocos2dx.a; path = "../../../../../../Library/Developer/Xcode/DerivedData/cocos2d-ios-efgwnjcjlugbweaakhyrdehqseht/Build/Products/Debug-iphoneos/libcocos2dx.a"; sourceTree = ""; }; - A0F3A9B5177905F600CF0EB6 /* libCocosDenshion.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libCocosDenshion.a; path = "../../../../../../Library/Developer/Xcode/DerivedData/cocos2d-ios-efgwnjcjlugbweaakhyrdehqseht/Build/Products/Debug-iphoneos/libCocosDenshion.a"; sourceTree = ""; }; - A0F3A9B6177905F600CF0EB6 /* libextensions.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libextensions.a; path = "../../../../extensions/proj.ios/build/Release-iphoneos/libextensions.a"; sourceTree = ""; }; - A0F3A9B7177905F600CF0EB6 /* libjsbindings.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libjsbindings.a; path = "../../../../../../Library/Developer/Xcode/DerivedData/cocos2d-ios-efgwnjcjlugbweaakhyrdehqseht/Build/Products/Debug-iphoneos/libjsbindings.a"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -108,13 +106,13 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - A0F3A9B8177905F600CF0EB6 /* libchipmunk.a in Frameworks */, - A0F3A9B9177905F600CF0EB6 /* libcocos2dx.a in Frameworks */, - A0F3A9BA177905F600CF0EB6 /* libCocosDenshion.a in Frameworks */, - A0F3A9BB177905F600CF0EB6 /* libextensions.a in Frameworks */, - A0F3A9BC177905F600CF0EB6 /* libjsbindings.a in Frameworks */, 1A6B05CB17782B8700FFE52B /* libsqlite3.dylib in Frameworks */, 1A6B05C917782B8100FFE52B /* libz.dylib in Frameworks */, + 1A6B059A177828E700FFE52B /* libchipmunk.a in Frameworks */, + 1A6B059B177828E700FFE52B /* libcocos2dx.a in Frameworks */, + 1A6B059C177828E700FFE52B /* libCocosDenshion.a in Frameworks */, + 1A6B059D177828E700FFE52B /* libextensions.a in Frameworks */, + 1A6B059E177828E700FFE52B /* libjsbindings.a in Frameworks */, 469A7A0216C0F242006FFCB2 /* QuartzCore.framework in Frameworks */, 469A7A0416C0F242006FFCB2 /* OpenGLES.framework in Frameworks */, 469A7A0616C0F242006FFCB2 /* OpenAL.framework in Frameworks */, @@ -152,7 +150,6 @@ 469A79F516C0F242006FFCB2 = { isa = PBXGroup; children = ( - A0C2189C1779272900BE78B5 /* Default-568h@2x.png */, 469A7D0516C0F429006FFCB2 /* Classes */, 469A7A0016C0F242006FFCB2 /* Frameworks */, 469A7CEE16C0F311006FFCB2 /* ios */, @@ -172,13 +169,13 @@ 469A7A0016C0F242006FFCB2 /* Frameworks */ = { isa = PBXGroup; children = ( - A0F3A9B3177905F600CF0EB6 /* libchipmunk.a */, - A0F3A9B4177905F600CF0EB6 /* libcocos2dx.a */, - A0F3A9B5177905F600CF0EB6 /* libCocosDenshion.a */, - A0F3A9B6177905F600CF0EB6 /* libextensions.a */, - A0F3A9B7177905F600CF0EB6 /* libjsbindings.a */, 1A6B05CA17782B8700FFE52B /* libsqlite3.dylib */, 1A6B05C817782B8100FFE52B /* libz.dylib */, + 1A6B0595177828E700FFE52B /* libchipmunk.a */, + 1A6B0596177828E700FFE52B /* libcocos2dx.a */, + 1A6B0597177828E700FFE52B /* libCocosDenshion.a */, + 1A6B0598177828E700FFE52B /* libextensions.a */, + 1A6B0599177828E700FFE52B /* libjsbindings.a */, 469A7A0116C0F242006FFCB2 /* QuartzCore.framework */, 469A7A0316C0F242006FFCB2 /* OpenGLES.framework */, 469A7A0516C0F242006FFCB2 /* OpenAL.framework */, @@ -307,7 +304,6 @@ 469A7DD716C0F74F006FFCB2 /* Icon.png in Resources */, 469A7DD816C0F74F006FFCB2 /* Icon@2x.png in Resources */, 46A2146116D4B04A00723F2B /* Background.png in Resources */, - A0C2189D1779272900BE78B5 /* Default-568h@2x.png in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/samples/Cpp/HelloCpp/proj.ios/HelloCpp.xcodeproj/project.pbxproj b/samples/Cpp/HelloCpp/proj.ios/HelloCpp.xcodeproj/project.pbxproj index 0898a5b77a..c1ae102e62 100644 --- a/samples/Cpp/HelloCpp/proj.ios/HelloCpp.xcodeproj/project.pbxproj +++ b/samples/Cpp/HelloCpp/proj.ios/HelloCpp.xcodeproj/project.pbxproj @@ -8,12 +8,12 @@ /* Begin PBXBuildFile section */ 15003FA315D2601D00B6775A /* iphone in Resources */ = {isa = PBXBuildFile; fileRef = 15003FA215D2601D00B6775A /* iphone */; }; + 1A0C0A6B1777F65600838530 /* libcocos2dx.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1A0C0A6A1777F65600838530 /* libcocos2dx.a */; }; 1A1CF3691626CEFF00AFC938 /* ipad in Resources */ = {isa = PBXBuildFile; fileRef = 1A1CF3671626CEFF00AFC938 /* ipad */; }; 1A1CF36A1626CEFF00AFC938 /* ipadhd in Resources */ = {isa = PBXBuildFile; fileRef = 1A1CF3681626CEFF00AFC938 /* ipadhd */; }; 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; }; 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; }; 288765A50DF7441C002DB57D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765A40DF7441C002DB57D /* CoreGraphics.framework */; }; - A0F3A9BE1779062B00CF0EB6 /* libcocos2dx.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A0F3A9BD1779062B00CF0EB6 /* libcocos2dx.a */; }; BF1373EF128A898400D9F789 /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BF492D4B1289302400A09262 /* OpenGLES.framework */; }; BF1373F0128A899500D9F789 /* libxml2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = BF492C21128924A800A09262 /* libxml2.dylib */; }; BF1373F1128A899E00D9F789 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = BF492B6912891AC600A09262 /* libz.dylib */; }; @@ -34,6 +34,7 @@ /* Begin PBXFileReference section */ 15003FA215D2601D00B6775A /* iphone */ = {isa = PBXFileReference; lastKnownFileType = folder; path = iphone; sourceTree = ""; }; + 1A0C0A6A1777F65600838530 /* libcocos2dx.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; name = libcocos2dx.a; path = "libcocos2dx.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 1A1CF3661626CB6000AFC938 /* AppMacros.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppMacros.h; sourceTree = ""; }; 1A1CF3671626CEFF00AFC938 /* ipad */ = {isa = PBXFileReference; lastKnownFileType = folder; path = ipad; sourceTree = ""; }; 1A1CF3681626CEFF00AFC938 /* ipadhd */ = {isa = PBXFileReference; lastKnownFileType = folder; path = ipadhd; sourceTree = ""; }; @@ -44,11 +45,6 @@ 781C33B11547F06B00633F88 /* OpenAL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenAL.framework; path = System/Library/Frameworks/OpenAL.framework; sourceTree = SDKROOT; }; 781C33B31547F06B00633F88 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; }; 781C33B51547F06B00633F88 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; }; - A0F3A9BD1779062B00CF0EB6 /* libcocos2dx.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libcocos2dx.a; path = "../../../../../../Library/Developer/Xcode/DerivedData/cocos2d-ios-efgwnjcjlugbweaakhyrdehqseht/Build/Products/Debug-iphoneos/libcocos2dx.a"; sourceTree = ""; }; - A0F3A9BF1779069A00CF0EB6 /* libBox2D.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libBox2D.a; path = "../../../../../../Library/Developer/Xcode/DerivedData/cocos2d-ios-efgwnjcjlugbweaakhyrdehqseht/Build/Products/Debug-iphoneos/libBox2D.a"; sourceTree = ""; }; - A0F3A9C01779069A00CF0EB6 /* libchipmunk.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libchipmunk.a; path = "../../../../external/chipmunk/proj.ios/build/Release-iphoneos/libchipmunk.a"; sourceTree = ""; }; - A0F3A9C11779069A00CF0EB6 /* libCocosDenshion.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libCocosDenshion.a; path = "../../../../../../Library/Developer/Xcode/DerivedData/cocos2d-ios-efgwnjcjlugbweaakhyrdehqseht/Build/Products/Debug-iphoneos/libCocosDenshion.a"; sourceTree = ""; }; - A0F3A9C21779069A00CF0EB6 /* libextensions.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libextensions.a; path = "../../../../extensions/proj.ios/build/Release-iphoneos/libextensions.a"; sourceTree = ""; }; BF137426128A8E4600D9F789 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; BF23D4E3143315EB00657E08 /* AppDelegate.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AppDelegate.cpp; sourceTree = ""; }; BF23D4E4143315EB00657E08 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; @@ -76,7 +72,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - A0F3A9BE1779062B00CF0EB6 /* libcocos2dx.a in Frameworks */, + 1A0C0A6B1777F65600838530 /* libcocos2dx.a in Frameworks */, 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */, 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */, 288765A50DF7441C002DB57D /* CoreGraphics.framework in Frameworks */, @@ -113,11 +109,7 @@ 29B97323FDCFA39411CA2CEA /* Frameworks */ = { isa = PBXGroup; children = ( - A0F3A9BF1779069A00CF0EB6 /* libBox2D.a */, - A0F3A9C01779069A00CF0EB6 /* libchipmunk.a */, - A0F3A9C11779069A00CF0EB6 /* libCocosDenshion.a */, - A0F3A9C21779069A00CF0EB6 /* libextensions.a */, - A0F3A9BD1779062B00CF0EB6 /* libcocos2dx.a */, + 1A0C0A6A1777F65600838530 /* libcocos2dx.a */, BF492B6912891AC600A09262 /* libz.dylib */, BF137426128A8E4600D9F789 /* QuartzCore.framework */, BF492D4B1289302400A09262 /* OpenGLES.framework */, diff --git a/samples/Cpp/SimpleGame/proj.ios/SimpleGame.xcodeproj/project.pbxproj b/samples/Cpp/SimpleGame/proj.ios/SimpleGame.xcodeproj/project.pbxproj index 741e720d41..5d72e948ee 100644 --- a/samples/Cpp/SimpleGame/proj.ios/SimpleGame.xcodeproj/project.pbxproj +++ b/samples/Cpp/SimpleGame/proj.ios/SimpleGame.xcodeproj/project.pbxproj @@ -3,16 +3,16 @@ archiveVersion = 1; classes = { }; - objectVersion = 46; + objectVersion = 45; objects = { /* Begin PBXBuildFile section */ + 1A6E475F177819520055514D /* libcocos2dx.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1A6E475D177819520055514D /* libcocos2dx.a */; }; + 1A6E4760177819520055514D /* libCocosDenshion.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1A6E475E177819520055514D /* libCocosDenshion.a */; }; 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; }; 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; }; 288765A50DF7441C002DB57D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765A40DF7441C002DB57D /* CoreGraphics.framework */; }; 782F4619153FEDF0009FC2E5 /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 782F4617153FEDF0009FC2E5 /* Default.png */; }; - A0F3A9B01779050000CF0EB6 /* libcocos2dx.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A0F3A9AF1779050000CF0EB6 /* libcocos2dx.a */; }; - A0F3A9B21779052600CF0EB6 /* libCocosDenshion.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A0F3A9B11779052600CF0EB6 /* libCocosDenshion.a */; }; BF1373EF128A898400D9F789 /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BF492D4B1289302400A09262 /* OpenGLES.framework */; }; BF1373F0128A899500D9F789 /* libxml2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = BF492C21128924A800A09262 /* libxml2.dylib */; }; BF1373F1128A899E00D9F789 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = BF492B6912891AC600A09262 /* libz.dylib */; }; @@ -39,6 +39,8 @@ /* End PBXBuildFile section */ /* Begin PBXFileReference section */ + 1A6E475D177819520055514D /* libcocos2dx.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; name = libcocos2dx.a; path = "libcocos2dx.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 1A6E475E177819520055514D /* libCocosDenshion.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; name = libCocosDenshion.a; path = "libCocosDenshion.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 1D6058910D05DD3D006BFB54 /* SimpleGame.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SimpleGame.app; sourceTree = BUILT_PRODUCTS_DIR; }; 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; @@ -47,8 +49,6 @@ 781C33B31547F06B00633F88 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; }; 781C33B51547F06B00633F88 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; }; 782F4617153FEDF0009FC2E5 /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Default.png; sourceTree = SOURCE_ROOT; }; - A0F3A9AF1779050000CF0EB6 /* libcocos2dx.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libcocos2dx.a; path = "../../../../../../Library/Developer/Xcode/DerivedData/cocos2d-ios-efgwnjcjlugbweaakhyrdehqseht/Build/Products/Debug-iphoneos/libcocos2dx.a"; sourceTree = ""; }; - A0F3A9B11779052600CF0EB6 /* libCocosDenshion.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libCocosDenshion.a; path = "../../../../../../Library/Developer/Xcode/DerivedData/cocos2d-ios-efgwnjcjlugbweaakhyrdehqseht/Build/Products/Debug-iphoneos/libCocosDenshion.a"; sourceTree = ""; }; BF137426128A8E4600D9F789 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; BF23D4E3143315EB00657E08 /* AppDelegate.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AppDelegate.cpp; sourceTree = ""; }; BF23D4E4143315EB00657E08 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; @@ -81,8 +81,8 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - A0F3A9B21779052600CF0EB6 /* libCocosDenshion.a in Frameworks */, - A0F3A9B01779050000CF0EB6 /* libcocos2dx.a in Frameworks */, + 1A6E475F177819520055514D /* libcocos2dx.a in Frameworks */, + 1A6E4760177819520055514D /* libCocosDenshion.a in Frameworks */, D4E6BCCE15FCBAD7008BF525 /* AudioToolbox.framework in Frameworks */, D4E6BCCD15FCBAC8008BF525 /* AVFoundation.framework in Frameworks */, D4E6BCCC15FCBABC008BF525 /* OpenAL.framework in Frameworks */, @@ -122,8 +122,8 @@ 29B97323FDCFA39411CA2CEA /* Frameworks */ = { isa = PBXGroup; children = ( - A0F3A9B11779052600CF0EB6 /* libCocosDenshion.a */, - A0F3A9AF1779050000CF0EB6 /* libcocos2dx.a */, + 1A6E475D177819520055514D /* libcocos2dx.a */, + 1A6E475E177819520055514D /* libCocosDenshion.a */, BF492B6912891AC600A09262 /* libz.dylib */, BF137426128A8E4600D9F789 /* QuartzCore.framework */, BF492D4B1289302400A09262 /* OpenGLES.framework */, @@ -208,11 +208,8 @@ /* Begin PBXProject section */ 29B97313FDCFA39411CA2CEA /* Project object */ = { isa = PBXProject; - attributes = { - LastUpgradeCheck = 0460; - }; buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "SimpleGame" */; - compatibilityVersion = "Xcode 3.2"; + compatibilityVersion = "Xcode 3.1"; developmentRegion = English; hasScannedForEncodings = 1; knownRegions = ( @@ -299,6 +296,7 @@ ); INFOPLIST_FILE = "SimpleGame-Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 5.0; + LIBRARY_SEARCH_PATHS = "$(inherited)"; ONLY_ACTIVE_ARCH = YES; PRODUCT_NAME = SimpleGame; PROVISIONING_PROFILE = ""; @@ -336,6 +334,7 @@ ); INFOPLIST_FILE = "SimpleGame-Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 5.0; + LIBRARY_SEARCH_PATHS = "$(inherited)"; ONLY_ACTIVE_ARCH = YES; PRODUCT_NAME = SimpleGame; PROVISIONING_PROFILE = ""; @@ -355,6 +354,7 @@ GCC_VERSION = ""; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; + PREBINDING = NO; SDKROOT = iphoneos; VALID_ARCHS = "armv6 armv7 i386"; }; @@ -370,6 +370,7 @@ GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; + PREBINDING = NO; SDKROOT = iphoneos; VALID_ARCHS = "armv6 armv7 i386"; }; diff --git a/samples/Cpp/TestCpp/proj.ios/TestCpp.xcodeproj/project.pbxproj.REMOVED.git-id b/samples/Cpp/TestCpp/proj.ios/TestCpp.xcodeproj/project.pbxproj.REMOVED.git-id index 85a7ea5155..cf80cff9a3 100644 --- a/samples/Cpp/TestCpp/proj.ios/TestCpp.xcodeproj/project.pbxproj.REMOVED.git-id +++ b/samples/Cpp/TestCpp/proj.ios/TestCpp.xcodeproj/project.pbxproj.REMOVED.git-id @@ -1 +1 @@ -a000f34faade66f3ab3354b00fa7b2c2aebd339c \ No newline at end of file +e4ca00d0a77436dcf2dc220c386d6cd0a2689450 \ No newline at end of file diff --git a/samples/Javascript/CocosDragonJS/proj.ios/CocosDragonJS.xcodeproj/project.pbxproj b/samples/Javascript/CocosDragonJS/proj.ios/CocosDragonJS.xcodeproj/project.pbxproj index 4344b05e68..dd5ac7daa2 100644 --- a/samples/Javascript/CocosDragonJS/proj.ios/CocosDragonJS.xcodeproj/project.pbxproj +++ b/samples/Javascript/CocosDragonJS/proj.ios/CocosDragonJS.xcodeproj/project.pbxproj @@ -53,11 +53,11 @@ 159004B3166DE19C006BF838 /* Icon-114.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-114.png"; sourceTree = ""; }; 159004B5166DE1A8006BF838 /* Icon-72.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-72.png"; sourceTree = ""; }; 159004B7166DE1AF006BF838 /* Icon-144.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-144.png"; sourceTree = ""; }; - 1A6E4698177813130055514D /* libchipmunk.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libchipmunk.a; path = "../../../../external/chipmunk/proj.ios/build/Release-iphoneos/libchipmunk.a"; sourceTree = ""; }; - 1A6E4699177813130055514D /* libcocos2dx.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libcocos2dx.a; path = "../../../../cocos2dx/proj.ios/build/Release-iphoneos/libcocos2dx.a"; sourceTree = ""; }; - 1A6E469A177813130055514D /* libCocosDenshion.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libCocosDenshion.a; path = "../../../../CocosDenshion/proj.ios/build/Release-iphoneos/libCocosDenshion.a"; sourceTree = ""; }; - 1A6E469B177813130055514D /* libextensions.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libextensions.a; path = "../../../../extensions/proj.ios/build/Release-iphoneos/libextensions.a"; sourceTree = ""; }; - 1A6E469C177813130055514D /* libjsbindings.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libjsbindings.a; path = "../../../../scripting/javascript/bindings/proj.ios/build/Release-iphoneos/libjsbindings.a"; sourceTree = ""; }; + 1A6E4698177813130055514D /* libchipmunk.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; name = libchipmunk.a; path = "libchipmunk.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 1A6E4699177813130055514D /* libcocos2dx.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; name = libcocos2dx.a; path = "libcocos2dx.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 1A6E469A177813130055514D /* libCocosDenshion.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; name = libCocosDenshion.a; path = "libCocosDenshion.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 1A6E469B177813130055514D /* libextensions.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; name = libextensions.a; path = "libextensions.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 1A6E469C177813130055514D /* libjsbindings.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; name = libjsbindings.a; path = "libjsbindings.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 1A6E46A41778147D0055514D /* jsb.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = jsb.js; sourceTree = ""; }; 1A6E46A51778147D0055514D /* jsb_chipmunk.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = jsb_chipmunk.js; sourceTree = ""; }; 1A6E46A61778147D0055514D /* jsb_chipmunk_constants.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = jsb_chipmunk_constants.js; sourceTree = ""; }; diff --git a/samples/Javascript/CrystalCraze/proj.ios/CrystalCraze.xcodeproj/project.pbxproj b/samples/Javascript/CrystalCraze/proj.ios/CrystalCraze.xcodeproj/project.pbxproj index b11c40ce07..f7853aa868 100644 --- a/samples/Javascript/CrystalCraze/proj.ios/CrystalCraze.xcodeproj/project.pbxproj +++ b/samples/Javascript/CrystalCraze/proj.ios/CrystalCraze.xcodeproj/project.pbxproj @@ -54,11 +54,11 @@ 159004B5166DE1A8006BF838 /* Icon-72.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-72.png"; sourceTree = ""; }; 159004B7166DE1AF006BF838 /* Icon-144.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-144.png"; sourceTree = ""; }; 1A21ED5116B02EE100A2E30E /* Published-iOS */ = {isa = PBXFileReference; lastKnownFileType = folder; name = "Published-iOS"; path = "../../Shared/games/CrystalCraze/Published-iOS"; sourceTree = ""; }; - 1A6E46CB177815E00055514D /* libchipmunk.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libchipmunk.a; path = "../../../../external/chipmunk/proj.ios/build/Release-iphoneos/libchipmunk.a"; sourceTree = ""; }; - 1A6E46CC177815E00055514D /* libcocos2dx.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libcocos2dx.a; path = "../../../../cocos2dx/proj.ios/build/Release-iphoneos/libcocos2dx.a"; sourceTree = ""; }; - 1A6E46CD177815E00055514D /* libCocosDenshion.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libCocosDenshion.a; path = "../../../../CocosDenshion/proj.ios/build/Release-iphoneos/libCocosDenshion.a"; sourceTree = ""; }; - 1A6E46CE177815E00055514D /* libextensions.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libextensions.a; path = "../../../../extensions/proj.ios/build/Release-iphoneos/libextensions.a"; sourceTree = ""; }; - 1A6E46CF177815E00055514D /* libjsbindings.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libjsbindings.a; path = "../../../../scripting/javascript/bindings/proj.ios/build/Release-iphoneos/libjsbindings.a"; sourceTree = ""; }; + 1A6E46CB177815E00055514D /* libchipmunk.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; name = libchipmunk.a; path = "libchipmunk.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 1A6E46CC177815E00055514D /* libcocos2dx.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; name = libcocos2dx.a; path = "libcocos2dx.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 1A6E46CD177815E00055514D /* libCocosDenshion.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; name = libCocosDenshion.a; path = "libCocosDenshion.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 1A6E46CE177815E00055514D /* libextensions.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; name = libextensions.a; path = "libextensions.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 1A6E46CF177815E00055514D /* libjsbindings.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; name = libjsbindings.a; path = "libjsbindings.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 1A6E46D7177816450055514D /* jsb.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = jsb.js; sourceTree = ""; }; 1A6E46D8177816450055514D /* jsb_chipmunk.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = jsb_chipmunk.js; sourceTree = ""; }; 1A6E46D9177816450055514D /* jsb_chipmunk_constants.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = jsb_chipmunk_constants.js; sourceTree = ""; }; diff --git a/samples/Javascript/MoonWarriors/proj.ios/MoonWarriors.xcodeproj/project.pbxproj b/samples/Javascript/MoonWarriors/proj.ios/MoonWarriors.xcodeproj/project.pbxproj index dbada6662e..30937057be 100644 --- a/samples/Javascript/MoonWarriors/proj.ios/MoonWarriors.xcodeproj/project.pbxproj +++ b/samples/Javascript/MoonWarriors/proj.ios/MoonWarriors.xcodeproj/project.pbxproj @@ -87,11 +87,11 @@ 15A3D2D51682EEC8002FB0C5 /* src */ = {isa = PBXFileReference; lastKnownFileType = folder; name = src; path = ../../Shared/games/MoonWarriors/src; sourceTree = ""; }; 15A3D2D81682EEEA002FB0C5 /* main.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = main.js; path = ../../Shared/games/MoonWarriors/main.js; sourceTree = ""; }; 15A3D2D91682EEEA002FB0C5 /* MoonWarriors-jsb.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = "MoonWarriors-jsb.js"; path = "../../Shared/games/MoonWarriors/MoonWarriors-jsb.js"; sourceTree = ""; }; - 1A6E46FC177818140055514D /* libchipmunk.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libchipmunk.a; path = "../../../../external/chipmunk/proj.ios/build/Release-iphoneos/libchipmunk.a"; sourceTree = ""; }; - 1A6E46FD177818140055514D /* libcocos2dx.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libcocos2dx.a; path = "../../../../cocos2dx/proj.ios/build/Release-iphoneos/libcocos2dx.a"; sourceTree = ""; }; - 1A6E46FE177818140055514D /* libCocosDenshion.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libCocosDenshion.a; path = "../../../../CocosDenshion/proj.ios/build/Release-iphoneos/libCocosDenshion.a"; sourceTree = ""; }; - 1A6E46FF177818140055514D /* libextensions.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libextensions.a; path = "../../../../extensions/proj.ios/build/Release-iphoneos/libextensions.a"; sourceTree = ""; }; - 1A6E4700177818150055514D /* libjsbindings.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libjsbindings.a; path = "../../../../scripting/javascript/bindings/proj.ios/build/Release-iphoneos/libjsbindings.a"; sourceTree = ""; }; + 1A6E46FC177818140055514D /* libchipmunk.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; name = libchipmunk.a; path = "libchipmunk.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 1A6E46FD177818140055514D /* libcocos2dx.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; name = libcocos2dx.a; path = "libcocos2dx.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 1A6E46FE177818140055514D /* libCocosDenshion.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; name = libCocosDenshion.a; path = "libCocosDenshion.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 1A6E46FF177818140055514D /* libextensions.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; name = libextensions.a; path = "libextensions.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 1A6E4700177818150055514D /* libjsbindings.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; name = libjsbindings.a; path = "libjsbindings.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 1A6E4707177818390055514D /* jsb.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = jsb.js; sourceTree = ""; }; 1A6E4708177818390055514D /* jsb_chipmunk.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = jsb_chipmunk.js; sourceTree = ""; }; 1A6E4709177818390055514D /* jsb_chipmunk_constants.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = jsb_chipmunk_constants.js; sourceTree = ""; }; diff --git a/samples/Javascript/TestJavascript/proj.ios/TestJavascript.xcodeproj/project.pbxproj b/samples/Javascript/TestJavascript/proj.ios/TestJavascript.xcodeproj/project.pbxproj index 5a9d30db4a..645f1436f2 100644 --- a/samples/Javascript/TestJavascript/proj.ios/TestJavascript.xcodeproj/project.pbxproj +++ b/samples/Javascript/TestJavascript/proj.ios/TestJavascript.xcodeproj/project.pbxproj @@ -117,11 +117,11 @@ 15A3D4621682F14C002FB0C5 /* main.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = main.js; path = ../../Shared/tests/main.js; sourceTree = ""; }; 15A3D4711682F14C002FB0C5 /* tests_resources-jsb.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = "tests_resources-jsb.js"; path = "../../Shared/tests/tests_resources-jsb.js"; sourceTree = ""; }; 15A3D4741682F14C002FB0C5 /* tests-main.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = "tests-main.js"; path = "../../Shared/tests/tests-main.js"; sourceTree = ""; }; - 1A4C3F0E17784B6000EDFB3B /* libchipmunk.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libchipmunk.a; path = "../../../../../../Library/Developer/Xcode/DerivedData/cocos2d-ios-etxtvifusbwprqeuljuprhxuzxti/Build/Products/Debug-iphoneos/libchipmunk.a"; sourceTree = ""; }; - 1A4C3F0F17784B6000EDFB3B /* libcocos2dx.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libcocos2dx.a; path = "../../../../../../Library/Developer/Xcode/DerivedData/cocos2d-ios-etxtvifusbwprqeuljuprhxuzxti/Build/Products/Debug-iphoneos/libcocos2dx.a"; sourceTree = ""; }; - 1A4C3F1017784B6000EDFB3B /* libCocosDenshion.a */ = {isa = PBXFileReference; lastKnownFileType = file; name = libCocosDenshion.a; path = "../../../../CocosDenshion/proj.ios/build/Release-iphoneos/libCocosDenshion.a"; sourceTree = ""; }; - 1A4C3F1117784B6000EDFB3B /* libextensions.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libextensions.a; path = "../../../../../../Library/Developer/Xcode/DerivedData/cocos2d-ios-etxtvifusbwprqeuljuprhxuzxti/Build/Products/Debug-iphoneos/libextensions.a"; sourceTree = ""; }; - 1A4C3F1217784B6000EDFB3B /* libjsbindings.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libjsbindings.a; path = "../../../../../../Library/Developer/Xcode/DerivedData/cocos2d-ios-etxtvifusbwprqeuljuprhxuzxti/Build/Products/Debug-iphoneos/libjsbindings.a"; sourceTree = ""; }; + 1A4C3F0E17784B6000EDFB3B /* libchipmunk.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = "libchipmunk.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 1A4C3F0F17784B6000EDFB3B /* libcocos2dx.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = "libcocos2dx.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 1A4C3F1017784B6000EDFB3B /* libCocosDenshion.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = "libCocosDenshion.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 1A4C3F1117784B6000EDFB3B /* libextensions.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = "libextensions.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 1A4C3F1217784B6000EDFB3B /* libjsbindings.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = "libjsbindings.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 1A6B05C417782A2400FFE52B /* libsqlite3.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libsqlite3.dylib; path = usr/lib/libsqlite3.dylib; sourceTree = SDKROOT; }; 1A6B05C617782B0500FFE52B /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = usr/lib/libz.dylib; sourceTree = SDKROOT; }; 1A6E4672177812AF0055514D /* jsb.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = jsb.js; sourceTree = ""; }; diff --git a/samples/Javascript/WatermelonWithMe/proj.ios/WatermelonWithMe.xcodeproj/project.pbxproj b/samples/Javascript/WatermelonWithMe/proj.ios/WatermelonWithMe.xcodeproj/project.pbxproj index 41443d62f2..208812ef63 100644 --- a/samples/Javascript/WatermelonWithMe/proj.ios/WatermelonWithMe.xcodeproj/project.pbxproj +++ b/samples/Javascript/WatermelonWithMe/proj.ios/WatermelonWithMe.xcodeproj/project.pbxproj @@ -64,11 +64,11 @@ 15A3D78B1682F470002FB0C5 /* main.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = main.js; path = ../../Shared/games/WatermelonWithMe/main.js; sourceTree = ""; }; 15A3D78C1682F470002FB0C5 /* resources-jsb.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = "resources-jsb.js"; path = "../../Shared/games/WatermelonWithMe/resources-jsb.js"; sourceTree = ""; }; 15A3D78D1682F470002FB0C5 /* watermelon_with_me.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = watermelon_with_me.js; path = ../../Shared/games/WatermelonWithMe/watermelon_with_me.js; sourceTree = ""; }; - 1A6E472C177818E90055514D /* libchipmunk.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libchipmunk.a; path = "../../../../external/chipmunk/proj.ios/build/Release-iphoneos/libchipmunk.a"; sourceTree = ""; }; - 1A6E472D177818E90055514D /* libcocos2dx.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libcocos2dx.a; path = "../../../../cocos2dx/proj.ios/build/Release-iphoneos/libcocos2dx.a"; sourceTree = ""; }; - 1A6E472E177818E90055514D /* libCocosDenshion.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libCocosDenshion.a; path = "../../../../CocosDenshion/proj.ios/build/Release-iphoneos/libCocosDenshion.a"; sourceTree = ""; }; - 1A6E472F177818E90055514D /* libextensions.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libextensions.a; path = "../../../../extensions/proj.ios/build/Release-iphoneos/libextensions.a"; sourceTree = ""; }; - 1A6E4730177818E90055514D /* libjsbindings.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libjsbindings.a; path = "../../../../scripting/javascript/bindings/proj.ios/build/Release-iphoneos/libjsbindings.a"; sourceTree = ""; }; + 1A6E472C177818E90055514D /* libchipmunk.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; name = libchipmunk.a; path = "libchipmunk.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 1A6E472D177818E90055514D /* libcocos2dx.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; name = libcocos2dx.a; path = "libcocos2dx.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 1A6E472E177818E90055514D /* libCocosDenshion.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; name = libCocosDenshion.a; path = "libCocosDenshion.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 1A6E472F177818E90055514D /* libextensions.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; name = libextensions.a; path = "libextensions.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 1A6E4730177818E90055514D /* libjsbindings.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; name = libjsbindings.a; path = "libjsbindings.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 1A6E4737177818FC0055514D /* jsb.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = jsb.js; sourceTree = ""; }; 1A6E4738177818FC0055514D /* jsb_chipmunk.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = jsb_chipmunk.js; sourceTree = ""; }; 1A6E4739177818FC0055514D /* jsb_chipmunk_constants.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = jsb_chipmunk_constants.js; sourceTree = ""; }; diff --git a/samples/Lua/HelloLua/proj.ios/HelloLua.xcodeproj/project.pbxproj b/samples/Lua/HelloLua/proj.ios/HelloLua.xcodeproj/project.pbxproj index 7734199ff3..1531215d78 100644 --- a/samples/Lua/HelloLua/proj.ios/HelloLua.xcodeproj/project.pbxproj +++ b/samples/Lua/HelloLua/proj.ios/HelloLua.xcodeproj/project.pbxproj @@ -49,12 +49,12 @@ /* End PBXBuildFile section */ /* Begin PBXFileReference section */ - 1A6E48DC17781C0F0055514D /* libcocos2dx.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libcocos2dx.a; path = "../../../../cocos2dx/proj.ios/build/Release-iphoneos/libcocos2dx.a"; sourceTree = ""; }; - 1A6E48DD17781C0F0055514D /* libCocosDenshion.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libCocosDenshion.a; path = "../../../../CocosDenshion/proj.ios/build/Release-iphoneos/libCocosDenshion.a"; sourceTree = ""; }; - 1A6E48DE17781C0F0055514D /* libluabindings.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libluabindings.a; path = "../../../../scripting/lua/proj.ios/build/Release-iphoneos/libluabindings.a"; sourceTree = ""; }; - 1A6E48EE17781D600055514D /* libchipmunk.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libchipmunk.a; path = "../../../../external/chipmunk/proj.ios/build/Release-iphoneos/libchipmunk.a"; sourceTree = ""; }; - 1A6E48F217781D920055514D /* libBox2D.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libBox2D.a; path = "../../../../external/Box2D/proj.ios/build/Release-iphoneos/libBox2D.a"; sourceTree = ""; }; - 1A6E4901177821FB0055514D /* libextensions.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libextensions.a; path = "../../../../extensions/proj.ios/build/Release-iphoneos/libextensions.a"; sourceTree = ""; }; + 1A6E48DC17781C0F0055514D /* libcocos2dx.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; name = libcocos2dx.a; path = "libcocos2dx.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 1A6E48DD17781C0F0055514D /* libCocosDenshion.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; name = libCocosDenshion.a; path = "libCocosDenshion.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 1A6E48DE17781C0F0055514D /* libluabindings.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; name = libluabindings.a; path = "libluabindings.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 1A6E48EE17781D600055514D /* libchipmunk.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; name = libchipmunk.a; path = "libchipmunk.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 1A6E48F217781D920055514D /* libBox2D.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; name = libBox2D.a; path = "libBox2D.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 1A6E4901177821FB0055514D /* libextensions.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; name = libextensions.a; path = "libextensions.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 1A6E49041778251B0055514D /* AudioEngine.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = AudioEngine.lua; sourceTree = ""; }; 1A6E49051778251B0055514D /* CCBReaderLoad.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CCBReaderLoad.lua; sourceTree = ""; }; 1A6E49061778251B0055514D /* Cocos2dConstants.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Cocos2dConstants.lua; sourceTree = ""; }; diff --git a/samples/Lua/TestLua/proj.ios/TestLua.xcodeproj/project.pbxproj b/samples/Lua/TestLua/proj.ios/TestLua.xcodeproj/project.pbxproj index d00b3fdbdb..7d60946d93 100644 --- a/samples/Lua/TestLua/proj.ios/TestLua.xcodeproj/project.pbxproj +++ b/samples/Lua/TestLua/proj.ios/TestLua.xcodeproj/project.pbxproj @@ -73,16 +73,16 @@ 15C156951683138E00D239F2 /* Icon-72.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-72.png"; sourceTree = SOURCE_ROOT; }; 15C156961683138E00D239F2 /* Icon-114.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-114.png"; sourceTree = SOURCE_ROOT; }; 15C156971683138E00D239F2 /* Icon-144.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-144.png"; sourceTree = SOURCE_ROOT; }; - 1A6E48E217781C2B0055514D /* libBox2D.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libBox2D.a; path = "../../../../external/Box2D/proj.ios/build/Release-iphoneos/libBox2D.a"; sourceTree = ""; }; - 1A6E48E317781C2B0055514D /* libchipmunk.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libchipmunk.a; path = "../../../../external/chipmunk/proj.ios/build/Release-iphoneos/libchipmunk.a"; sourceTree = ""; }; - 1A6E48E417781C2B0055514D /* libcocos2dx.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libcocos2dx.a; path = "../../../../cocos2dx/proj.ios/build/Release-iphoneos/libcocos2dx.a"; sourceTree = ""; }; - 1A6E48E517781C2B0055514D /* libCocosDenshion.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libCocosDenshion.a; path = "../../../../CocosDenshion/proj.ios/build/Release-iphoneos/libCocosDenshion.a"; sourceTree = ""; }; - 1A6E48E717781C2B0055514D /* libluabindings.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libluabindings.a; path = "../../../../scripting/lua/proj.ios/build/Release-iphoneos/libluabindings.a"; sourceTree = ""; }; + 1A6E48E217781C2B0055514D /* libBox2D.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; name = libBox2D.a; path = "libBox2D.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 1A6E48E317781C2B0055514D /* libchipmunk.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; name = libchipmunk.a; path = "libchipmunk.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 1A6E48E417781C2B0055514D /* libcocos2dx.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; name = libcocos2dx.a; path = "libcocos2dx.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 1A6E48E517781C2B0055514D /* libCocosDenshion.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; name = libCocosDenshion.a; path = "libCocosDenshion.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 1A6E48E717781C2B0055514D /* libluabindings.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; name = libluabindings.a; path = "libluabindings.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 1A6E48F717781F9F0055514D /* AudioEngine.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = AudioEngine.lua; sourceTree = ""; }; 1A6E48F817781F9F0055514D /* CCBReaderLoad.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CCBReaderLoad.lua; sourceTree = ""; }; 1A6E48F917781F9F0055514D /* Cocos2dConstants.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Cocos2dConstants.lua; sourceTree = ""; }; 1A6E48FA17781F9F0055514D /* OpenglConstants.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = OpenglConstants.lua; sourceTree = ""; }; - 1A6E48FF177821AF0055514D /* libextensions.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libextensions.a; path = "../../../../extensions/proj.ios/build/Release-iphoneos/libextensions.a"; sourceTree = ""; }; + 1A6E48FF177821AF0055514D /* libextensions.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; name = libextensions.a; path = "libextensions.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 1AD263A1168350490089000C /* luaScript */ = {isa = PBXFileReference; lastKnownFileType = folder; name = luaScript; path = ../../../Lua/TestLua/Resources/luaScript; sourceTree = ""; }; 1AD263A31683506C0089000C /* animations */ = {isa = PBXFileReference; lastKnownFileType = folder; path = animations; sourceTree = ""; }; 1AD263A41683506C0089000C /* app.icf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = app.icf; sourceTree = ""; }; From cb2f42d0c65f7d55db0f7b420c409a86e4b998a6 Mon Sep 17 00:00:00 2001 From: Sam Clegg Date: Tue, 25 Jun 2013 08:11:28 -0700 Subject: [PATCH 05/15] Share top level Makefile between emscripten, linux and nacl. Remove the custom top level Makefile.emscripten and instead add build-emscripten.sh which can be used like build-linux.sh and build-nacl.sh. Also, use the top level lib folder to store emscripten libs. This brings it in line with the other make-based builds. --- Makefile | 14 +++++++++++--- Makefile.emscripten | 26 -------------------------- build-emscripten.sh | 23 +++++++++++++++++++++++ tools/travis-scripts/run-script.sh | 2 +- 4 files changed, 35 insertions(+), 30 deletions(-) delete mode 100644 Makefile.emscripten create mode 100755 build-emscripten.sh diff --git a/Makefile b/Makefile index a22d1a7399..7de904d739 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ PLATFORM ?= linux -define MAKE_TARGET +define MAKE_TARGETS +$(MAKE) -C external/chipmunk/proj.$(PLATFORM) $@ +$(MAKE) -C external/Box2D/proj.$(PLATFORM) $@ +$(MAKE) -C CocosDenshion/proj.$(PLATFORM) $@ @@ -10,14 +10,22 @@ define MAKE_TARGET +$(MAKE) -C samples/Cpp/HelloCpp/proj.$(PLATFORM) $@ +$(MAKE) -C samples/Cpp/TestCpp/proj.$(PLATFORM) $@ +$(MAKE) -C samples/Cpp/SimpleGame/proj.$(PLATFORM) $@ +endef + +# Haven't yet got the lua projects working with emscripten +ifneq ($(PLATFORM),emscripten) +define MAKE_LUA +$(MAKE) -C samples/Lua/HelloLua/proj.$(PLATFORM) $@ +$(MAKE) -C samples/Lua/TestLua/proj.$(PLATFORM) $@ endef +endif all: - $(call MAKE_TARGET,all) + $(call MAKE_TARGETS,all) + $(call MAKE_LUA,all) clean: - $(call MAKE_TARGET,clean) + $(call MAKE_TARGETS,clean) + $(call MAKE_LUA,clean) .PHONY: all clean diff --git a/Makefile.emscripten b/Makefile.emscripten deleted file mode 100644 index b618f4e949..0000000000 --- a/Makefile.emscripten +++ /dev/null @@ -1,26 +0,0 @@ -PLATFORM = emscripten - -define MAKE_TARGET - +$(MAKE) -C external/chipmunk/proj.$(PLATFORM) $@ - +$(MAKE) -C external/Box2D/proj.$(PLATFORM) $@ - +$(MAKE) -C CocosDenshion/proj.$(PLATFORM) $@ - +$(MAKE) -C extensions/proj.$(PLATFORM) $@ - +$(MAKE) -C cocos2dx/proj.$(PLATFORM) $@ - +$(MAKE) -C scripting/lua/proj.$(PLATFORM) $@ - +$(MAKE) -C samples/Cpp/HelloCpp/proj.$(PLATFORM) $@ - +$(MAKE) -C samples/Cpp/TestCpp/proj.$(PLATFORM) $@ - +$(MAKE) -C samples/Cpp/SimpleGame/proj.$(PLATFORM) $@ -endef - - -# Haven't yet got the lua projects working. -# +$(MAKE) -C samples/Lua/HelloLua/proj.$(PLATFORM) $@ -# +$(MAKE) -C samples/Lua/TestLua/proj.$(PLATFORM) $@ - -all: - $(call MAKE_TARGET,all) - -clean: - $(call MAKE_TARGET,clean) - -.PHONY: all clean diff --git a/build-emscripten.sh b/build-emscripten.sh new file mode 100755 index 0000000000..11ebfe67b7 --- /dev/null +++ b/build-emscripten.sh @@ -0,0 +1,23 @@ +#!/bin/bash +# Build script to build all components for emscripten. +# +# By default this script will build the 'all' target in +# both debug and release configurations. Pass "clean" to +# clean all configuration. +# +# This script expects llvm-3.2 to be installed in +# $HOME/bin/clang+llvm-3.2. + +SCRIPT_DIR=$(dirname ${BASH_SOURCE}) + +set -e +set -x + +cd $SCRIPT_DIR + +export PYTHON=/usr/bin/python +export LLVM=$HOME/bin/clang+llvm-3.2/bin +export LLVM_ROOT=$LLVM + +make PLATFORM=emscripten DEBUG=1 -j10 $* +make PLATFORM=emscripten DEBUG=0 -j10 $* diff --git a/tools/travis-scripts/run-script.sh b/tools/travis-scripts/run-script.sh index 558f2b5e9b..4137da41a2 100755 --- a/tools/travis-scripts/run-script.sh +++ b/tools/travis-scripts/run-script.sh @@ -65,7 +65,7 @@ elif [ "$PLATFORM"x = "emscripten"x ]; then export LLVM_ROOT=$LLVM sudo mkdir -p /Library/Fonts sudo cp samples/Cpp/TestCpp/Resources/fonts/arial.ttf /Library/Fonts/Arial.ttf - EMCC_DEBUG=1 make -f Makefile.emscripten -j 8 + EMCC_DEBUG=1 make PLATFORM=emscripten -j 8 elif [ "$PLATFORM"x = "ios"x ]; then cd $COCOS2DX_ROOT/tools/travis-scripts ./generate-jsbindings.sh From f9ae701a4b32b4524a399c46ecd44f56f664e1c7 Mon Sep 17 00:00:00 2001 From: Sam Clegg Date: Tue, 25 Jun 2013 11:44:29 -0700 Subject: [PATCH 06/15] Fix emscripten build on linux Remove the dependacy of the emscripten build on /Library/Fonts (a darwin-only folder). On non-darwin platforms we use the ariel.tff that is part of TestCpp. --- cocos2dx/proj.emscripten/cocos2dx.mk | 2 +- samples/Cpp/HelloCpp/proj.emscripten/Makefile | 9 ++++++++- samples/Cpp/SimpleGame/proj.emscripten/Makefile | 8 +++++++- tools/travis-scripts/run-script.sh | 2 -- 4 files changed, 16 insertions(+), 5 deletions(-) diff --git a/cocos2dx/proj.emscripten/cocos2dx.mk b/cocos2dx/proj.emscripten/cocos2dx.mk index 96cb5eb335..348d635dfd 100644 --- a/cocos2dx/proj.emscripten/cocos2dx.mk +++ b/cocos2dx/proj.emscripten/cocos2dx.mk @@ -31,7 +31,7 @@ JSLIBS := --js-library $(COCOS_SRC)/platform/emscripten/CCTextureCacheEmscripten CCFLAGS += -MMD -Wall -fPIC -Qunused-arguments -Wno-overloaded-virtual -Qunused-variable -s TOTAL_MEMORY=268435456 -s VERBOSE=1 -U__native_client__ $(EXPORTED_FLAGS) $(JSLIBS) CXXFLAGS += -MMD -Wall -fPIC -Qunused-arguments -Wno-overloaded-virtual -Qunused-variable -s TOTAL_MEMORY=268435456 -s VERBOSE=1 -U__native_client__ $(EXPORTED_FLAGS) $(JSLIBS) -LIB_DIR = $(COCOS_SRC)/lib/emscripten +LIB_DIR = $(COCOS_ROOT)/lib/emscripten BIN_DIR = bin INCLUDES += \ diff --git a/samples/Cpp/HelloCpp/proj.emscripten/Makefile b/samples/Cpp/HelloCpp/proj.emscripten/Makefile index 02ba3439e1..9e47a17ce9 100644 --- a/samples/Cpp/HelloCpp/proj.emscripten/Makefile +++ b/samples/Cpp/HelloCpp/proj.emscripten/Makefile @@ -24,6 +24,13 @@ $(TARGET).js: $(OBJECTS) $(STATICLIBS) $(COCOS_LIBS) $(CORE_MAKEFILE_LIST) @mkdir -p $(@D) $(CXX) $(CXXFLAGS) $(OBJECTS) -o $@ $(SHAREDLIBS) $(STATICLIBS) + +ifeq ($(shell uname -s),Darwin) +ARIEL_TTF := /Library/Fonts/Arial.ttf +else +ARIEL_TTF := $(COCOS_ROOT)/samples/Cpp/TestCpp/Resources/fonts/arial.ttf +endif + $(TARGET).data: @mkdir -p $(@D) $(eval RESTMP := $(shell mktemp -d /tmp/cocos-emscripten.XXXXXX)) @@ -32,7 +39,7 @@ $(TARGET).data: (cd $(RESOURCE_PATH) && cp -a $(RESOURCES) $(RESTMP)) (cd $(FONT_PATH) && cp -a * $(RESTMP)/fonts) # NOTE: we copy the system arial.ttf so that there is always a fallback. - cp /Library/Fonts/Arial.ttf $(RESTMP)/fonts/arial.ttf + cp $(ARIEL_TTF) $(RESTMP)/fonts/arial.ttf (cd $(RESTMP); python $(PACKAGER) $(EXECUTABLE).data $(patsubst %,--preload %,$(RESOURCES)) --preload fonts --pre-run > $(EXECUTABLE).data.js) mv $(RESTMP)/$(EXECUTABLE).data $@ mv $(RESTMP)/$(EXECUTABLE).data.js $@.js diff --git a/samples/Cpp/SimpleGame/proj.emscripten/Makefile b/samples/Cpp/SimpleGame/proj.emscripten/Makefile index a4a929d639..39559056f2 100644 --- a/samples/Cpp/SimpleGame/proj.emscripten/Makefile +++ b/samples/Cpp/SimpleGame/proj.emscripten/Makefile @@ -37,6 +37,12 @@ $(TARGET).js: $(OBJECTS) $(STATICLIBS) $(COCOS_LIBS) $(CORE_MAKEFILE_LIST) @mkdir -p $(@D) $(CXX) $(CXXFLAGS) $(OBJECTS) -o $@ $(SHAREDLIBS) $(STATICLIBS) +ifeq ($(shell uname -s),Darwin) +ARIEL_TTF := /Library/Fonts/Arial.ttf +else +ARIEL_TTF := $(COCOS_ROOT)/samples/Cpp/TestCpp/Resources/fonts/arial.ttf +endif + $(TARGET).data: @mkdir -p $(@D) $(eval RESTMP := $(shell mktemp -d /tmp/cocos-emscripten.XXXXXX)) @@ -45,7 +51,7 @@ $(TARGET).data: (cd $(RESOURCE_PATH) && tar cf - $(RESOURCES)) | (cd $(RESTMP) && tar xvf -) (cd $(SD_RESOURCE_PATH) && tar cf - $(SD_RESOURCES)) | (cd $(RESTMP) && tar xvf -) # NOTE: we copy the system arial.ttf so that there is always a fallback. - cp /Library/Fonts/Arial.ttf $(RESTMP)/fonts/arial.ttf + cp $(ARIEL_TTF) $(RESTMP)/fonts/arial.ttf (cd $(RESTMP); python $(PACKAGER) $(EXECUTABLE).data $(patsubst %,--preload %,$(ALL_ASSETS)) --preload fonts --pre-run > $(EXECUTABLE).data.js) mv $(RESTMP)/$(EXECUTABLE).data $@ mv $(RESTMP)/$(EXECUTABLE).data.js $@.js diff --git a/tools/travis-scripts/run-script.sh b/tools/travis-scripts/run-script.sh index 4137da41a2..a9253a9d1b 100755 --- a/tools/travis-scripts/run-script.sh +++ b/tools/travis-scripts/run-script.sh @@ -63,8 +63,6 @@ elif [ "$PLATFORM"x = "emscripten"x ]; then export PYTHON=/usr/bin/python export LLVM=$HOME/bin/clang+llvm-3.2/bin export LLVM_ROOT=$LLVM - sudo mkdir -p /Library/Fonts - sudo cp samples/Cpp/TestCpp/Resources/fonts/arial.ttf /Library/Fonts/Arial.ttf EMCC_DEBUG=1 make PLATFORM=emscripten -j 8 elif [ "$PLATFORM"x = "ios"x ]; then cd $COCOS2DX_ROOT/tools/travis-scripts From 79962cdf5d9cb0e57c9c779926889d726f29a97a Mon Sep 17 00:00:00 2001 From: James Chen Date: Wed, 26 Jun 2013 10:08:02 +0800 Subject: [PATCH 07/15] issue #2305: Using c++11 std::thread instead of pthread for HttpClient class. --- extensions/network/HttpClient.cpp | 91 ++++++++++++------------------- 1 file changed, 35 insertions(+), 56 deletions(-) diff --git a/extensions/network/HttpClient.cpp b/extensions/network/HttpClient.cpp index 052951b047..bf3acdd878 100644 --- a/extensions/network/HttpClient.cpp +++ b/extensions/network/HttpClient.cpp @@ -24,22 +24,19 @@ ****************************************************************************/ #include "HttpClient.h" -// #include "platform/CCThread.h" - +#include #include -#include #include #include "curl/curl.h" NS_CC_EXT_BEGIN -static pthread_t s_networkThread; -static pthread_mutex_t s_requestQueueMutex; -static pthread_mutex_t s_responseQueueMutex; +static std::mutex s_requestQueueMutex; +static std::mutex s_responseQueueMutex; -static pthread_mutex_t s_SleepMutex; -static pthread_cond_t s_SleepCondition; +static std::mutex s_SleepMutex; +static std::condition_variable s_SleepCondition; static unsigned long s_asyncRequestCount = 0; @@ -93,7 +90,7 @@ static int processDeleteTask(HttpRequest *request, write_callback callback, void // Worker thread -static void* networkThread(void *data) +static void networkThread(void) { HttpRequest *request = NULL; @@ -107,20 +104,12 @@ static void* networkThread(void *data) // step 1: send http request if the requestQueue isn't empty request = NULL; - pthread_mutex_lock(&s_requestQueueMutex); //Get request task from queue - if (0 != s_requestQueue->count()) { + std::unique_lock lk(s_requestQueueMutex); //Get request task from queue + s_SleepCondition.wait(lk, []{ return 0 != s_requestQueue->count(); }); + request = dynamic_cast(s_requestQueue->objectAtIndex(0)); - s_requestQueue->removeObjectAtIndex(0); - // request's refcount = 1 here - } - pthread_mutex_unlock(&s_requestQueueMutex); - - if (NULL == request) - { - // Wait for http request tasks from main thread - pthread_cond_wait(&s_SleepCondition, &s_SleepMutex); - continue; + s_requestQueue->removeObjectAtIndex(0); } // step 2: libcurl sync access @@ -194,37 +183,30 @@ static void* networkThread(void *data) // add response packet into queue - pthread_mutex_lock(&s_responseQueueMutex); - s_responseQueue->addObject(response); - pthread_mutex_unlock(&s_responseQueueMutex); - + { + std::lock_guard lk(s_responseQueueMutex); + s_responseQueue->addObject(response); + } // resume dispatcher selector Director::sharedDirector()->getScheduler()->resumeTarget(HttpClient::getInstance()); } // cleanup: if worker thread received quit signal, clean up un-completed request queue - pthread_mutex_lock(&s_requestQueueMutex); - s_requestQueue->removeAllObjects(); - pthread_mutex_unlock(&s_requestQueueMutex); + { + std::lock_guard lk(s_requestQueueMutex); + s_requestQueue->removeAllObjects(); + } + s_asyncRequestCount -= s_requestQueue->count(); if (s_requestQueue != NULL) { - - pthread_mutex_destroy(&s_requestQueueMutex); - pthread_mutex_destroy(&s_responseQueueMutex); - - pthread_mutex_destroy(&s_SleepMutex); - pthread_cond_destroy(&s_SleepCondition); s_requestQueue->release(); s_requestQueue = NULL; s_responseQueue->release(); s_responseQueue = NULL; } - - pthread_exit(NULL); - return 0; } //Configure curl's timeout property @@ -405,7 +387,7 @@ HttpClient::~HttpClient() need_quit = true; if (s_requestQueue != NULL) { - pthread_cond_signal(&s_SleepCondition); + s_SleepCondition.notify_one(); } s_pHttpClient = NULL; @@ -423,15 +405,10 @@ bool HttpClient::lazyInitThreadSemphore() s_responseQueue = new Array(); s_responseQueue->init(); - - pthread_mutex_init(&s_requestQueueMutex, NULL); - pthread_mutex_init(&s_responseQueueMutex, NULL); - - pthread_mutex_init(&s_SleepMutex, NULL); - pthread_cond_init(&s_SleepCondition, NULL); - pthread_create(&s_networkThread, NULL, networkThread, NULL); - pthread_detach(s_networkThread); + + auto t = std::thread(&networkThread); + t.detach(); need_quit = false; } @@ -455,13 +432,13 @@ void HttpClient::send(HttpRequest* request) ++s_asyncRequestCount; request->retain(); - - pthread_mutex_lock(&s_requestQueueMutex); - s_requestQueue->addObject(request); - pthread_mutex_unlock(&s_requestQueueMutex); + { + std::lock_guard lk(s_requestQueueMutex); + s_requestQueue->addObject(request); + } // Notify thread start to work - pthread_cond_signal(&s_SleepCondition); + s_SleepCondition.notify_one(); } // Poll and notify main thread if responses exists in queue @@ -471,13 +448,15 @@ void HttpClient::dispatchResponseCallbacks(float delta) HttpResponse* response = NULL; - pthread_mutex_lock(&s_responseQueueMutex); - if (s_responseQueue->count()) { - response = dynamic_cast(s_responseQueue->objectAtIndex(0)); - s_responseQueue->removeObjectAtIndex(0); + std::lock_guard lk(s_responseQueueMutex); + + if (s_responseQueue->count()) + { + response = dynamic_cast(s_responseQueue->objectAtIndex(0)); + s_responseQueue->removeObjectAtIndex(0); + } } - pthread_mutex_unlock(&s_responseQueueMutex); if (response) { From 8a0046a139ee643ed089e51ecf8744631eb3fe90 Mon Sep 17 00:00:00 2001 From: James Chen Date: Wed, 26 Jun 2013 10:10:23 +0800 Subject: [PATCH 08/15] issue #2305: Fixing a crash when error is triggered in WebSocket. Using std::lock_guard to replace lock and unlock manually. --- extensions/network/WebSocket.cpp | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/extensions/network/WebSocket.cpp b/extensions/network/WebSocket.cpp index 5bf73481dc..73a5a19f09 100644 --- a/extensions/network/WebSocket.cpp +++ b/extensions/network/WebSocket.cpp @@ -119,6 +119,7 @@ WsThreadHelper::WsThreadHelper() WsThreadHelper::~WsThreadHelper() { Director::sharedDirector()->getScheduler()->unscheduleAllForTarget(this); + joinSubThread(); CC_SAFE_DELETE(_subThreadInstance); delete _UIWsMessageQueue; delete _subThreadWsMessageQueue; @@ -130,7 +131,6 @@ bool WsThreadHelper::createThread(const WebSocket& ws) // Creates websocket thread _subThreadInstance = new std::thread(&WsThreadHelper::wsThreadEntryFunc, this); - return true; } @@ -156,16 +156,14 @@ void WsThreadHelper::wsThreadEntryFunc() void WsThreadHelper::sendMessageToUIThread(WsMessage *msg) { - _UIWsMessageQueueMutex.lock(); + std::lock_guard lk(_UIWsMessageQueueMutex); _UIWsMessageQueue->push_back(msg); - _UIWsMessageQueueMutex.unlock(); } void WsThreadHelper::sendMessageToSubThread(WsMessage *msg) { - _subThreadWsMessageQueueMutex.lock(); + std::lock_guard lk(_subThreadWsMessageQueueMutex); _subThreadWsMessageQueue->push_back(msg); - _subThreadWsMessageQueueMutex.unlock(); } void WsThreadHelper::joinSubThread() @@ -181,17 +179,16 @@ void WsThreadHelper::update(float dt) WsMessage *msg = NULL; // Returns quickly if no message - _UIWsMessageQueueMutex.lock(); + std::lock_guard lk(_UIWsMessageQueueMutex); + if (0 == _UIWsMessageQueue->size()) { - _UIWsMessageQueueMutex.unlock(); return; } // Gets message msg = *(_UIWsMessageQueue->begin()); _UIWsMessageQueue->pop_front(); - _UIWsMessageQueueMutex.unlock(); if (_ws) { @@ -501,7 +498,8 @@ int WebSocket::onSocketCallback(struct libwebsocket_context *ctx, case LWS_CALLBACK_CLIENT_WRITEABLE: { - _wsHelper->_subThreadWsMessageQueueMutex.lock(); + std::lock_guard lk(_wsHelper->_subThreadWsMessageQueueMutex); + std::list::iterator iter = _wsHelper->_subThreadWsMessageQueue->begin(); int bytesWrite = 0; @@ -550,7 +548,6 @@ int WebSocket::onSocketCallback(struct libwebsocket_context *ctx, _wsHelper->_subThreadWsMessageQueue->clear(); - _wsHelper->_subThreadWsMessageQueueMutex.unlock(); /* get notified as soon as we can write again */ From f2ab73c533b92dcc5089c3ae1a7d6873c8d00553 Mon Sep 17 00:00:00 2001 From: James Chen Date: Wed, 26 Jun 2013 10:45:46 +0800 Subject: [PATCH 09/15] issue #2305: Reverting to use lock and unlock for HttpClient. --- extensions/network/HttpClient.cpp | 37 +++++++++++++++---------------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/extensions/network/HttpClient.cpp b/extensions/network/HttpClient.cpp index bf3acdd878..7f6b9ac702 100644 --- a/extensions/network/HttpClient.cpp +++ b/extensions/network/HttpClient.cpp @@ -183,19 +183,18 @@ static void networkThread(void) // add response packet into queue - { - std::lock_guard lk(s_responseQueueMutex); - s_responseQueue->addObject(response); - } + s_responseQueueMutex.lock(); + s_responseQueue->addObject(response); + s_responseQueueMutex.unlock(); + // resume dispatcher selector Director::sharedDirector()->getScheduler()->resumeTarget(HttpClient::getInstance()); } // cleanup: if worker thread received quit signal, clean up un-completed request queue - { - std::lock_guard lk(s_requestQueueMutex); - s_requestQueue->removeAllObjects(); - } + s_requestQueueMutex.lock(); + s_requestQueue->removeAllObjects(); + s_requestQueueMutex.unlock(); s_asyncRequestCount -= s_requestQueue->count(); @@ -433,10 +432,10 @@ void HttpClient::send(HttpRequest* request) request->retain(); - { - std::lock_guard lk(s_requestQueueMutex); - s_requestQueue->addObject(request); - } + s_requestQueueMutex.lock(); + s_requestQueue->addObject(request); + s_requestQueueMutex.unlock(); + // Notify thread start to work s_SleepCondition.notify_one(); } @@ -448,16 +447,16 @@ void HttpClient::dispatchResponseCallbacks(float delta) HttpResponse* response = NULL; - { - std::lock_guard lk(s_responseQueueMutex); + s_responseQueueMutex.lock(); - if (s_responseQueue->count()) - { - response = dynamic_cast(s_responseQueue->objectAtIndex(0)); - s_responseQueue->removeObjectAtIndex(0); - } + if (s_responseQueue->count()) + { + response = dynamic_cast(s_responseQueue->objectAtIndex(0)); + s_responseQueue->removeObjectAtIndex(0); } + s_responseQueueMutex.unlock(); + if (response) { --s_asyncRequestCount; From 3ad11cc63a203cc849785f75b1cff2fe4e27e426 Mon Sep 17 00:00:00 2001 From: James Chen Date: Wed, 26 Jun 2013 11:06:13 +0800 Subject: [PATCH 10/15] issue #2305: Fixing a bug that passing wrong mutex parameter to "wait". --- extensions/network/HttpClient.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/extensions/network/HttpClient.cpp b/extensions/network/HttpClient.cpp index 7f6b9ac702..24b7dc1882 100644 --- a/extensions/network/HttpClient.cpp +++ b/extensions/network/HttpClient.cpp @@ -104,13 +104,14 @@ static void networkThread(void) // step 1: send http request if the requestQueue isn't empty request = NULL; - { - std::unique_lock lk(s_requestQueueMutex); //Get request task from queue - s_SleepCondition.wait(lk, []{ return 0 != s_requestQueue->count(); }); - - request = dynamic_cast(s_requestQueue->objectAtIndex(0)); - s_requestQueue->removeObjectAtIndex(0); - } + s_requestQueueMutex.lock(); + request = dynamic_cast(s_requestQueue->objectAtIndex(0)); + s_requestQueue->removeObjectAtIndex(0); + s_requestQueueMutex.unlock(); + + std::unique_lock lk(s_SleepMutex); //Get request task from queue + s_SleepCondition.wait(lk, []{ return 0 != s_requestQueue->count(); }); + // step 2: libcurl sync access From ea36707c574b5a5b6a671579213408e6f753fe52 Mon Sep 17 00:00:00 2001 From: James Chen Date: Wed, 26 Jun 2013 11:10:19 +0800 Subject: [PATCH 11/15] issue #2305: Using the old logic of "wait". --- extensions/network/HttpClient.cpp | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/extensions/network/HttpClient.cpp b/extensions/network/HttpClient.cpp index 24b7dc1882..e7d4e61cf2 100644 --- a/extensions/network/HttpClient.cpp +++ b/extensions/network/HttpClient.cpp @@ -105,13 +105,24 @@ static void networkThread(void) request = NULL; s_requestQueueMutex.lock(); - request = dynamic_cast(s_requestQueue->objectAtIndex(0)); - s_requestQueue->removeObjectAtIndex(0); + + //Get request task from queue + + if (0 != s_requestQueue->count()) + { + request = dynamic_cast(s_requestQueue->objectAtIndex(0)); + s_requestQueue->removeObjectAtIndex(0); + } + s_requestQueueMutex.unlock(); - std::unique_lock lk(s_SleepMutex); //Get request task from queue - s_SleepCondition.wait(lk, []{ return 0 != s_requestQueue->count(); }); - + if (NULL == request) + { + // Wait for http request tasks from main thread + std::unique_lock lk(s_SleepMutex); + s_SleepCondition.wait(lk); + continue; + } // step 2: libcurl sync access From ae737365d7f88c155d4881f68b4104ffb257c41b Mon Sep 17 00:00:00 2001 From: James Chen Date: Wed, 26 Jun 2013 11:34:04 +0800 Subject: [PATCH 12/15] issue #2305: Sleep(50) on Win32, usleep(50000) on unix --> std::this_thread::sleep_for(std::chrono::milliseconds(50)); --- extensions/network/WebSocket.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/extensions/network/WebSocket.cpp b/extensions/network/WebSocket.cpp index 73a5a19f09..5cee37b34c 100644 --- a/extensions/network/WebSocket.cpp +++ b/extensions/network/WebSocket.cpp @@ -391,11 +391,8 @@ int WebSocket::onSubThreadLoop() } // Sleep 50 ms -#ifdef WIN32 - Sleep(50); -#else - usleep(50000); -#endif + std::this_thread::sleep_for(std::chrono::milliseconds(50)); + // return 0 to continue the loop. return 0; } From 229e181625337e41ec4cc78f144befe5e0ddc06d Mon Sep 17 00:00:00 2001 From: James Chen Date: Wed, 26 Jun 2013 12:52:38 +0800 Subject: [PATCH 13/15] issue #2305: [Win32] Removing the third party library pthreadVCE2. --- .../third_party/win32/pthread/pthread.h | 1368 ----------------- .../third_party/win32/pthread/sched.h | 178 --- .../third_party/win32/pthread/semaphore.h | 166 -- cocos2dx/proj.win32/cocos2dx.props | 2 +- 4 files changed, 1 insertion(+), 1713 deletions(-) delete mode 100644 cocos2dx/platform/third_party/win32/pthread/pthread.h delete mode 100644 cocos2dx/platform/third_party/win32/pthread/sched.h delete mode 100644 cocos2dx/platform/third_party/win32/pthread/semaphore.h diff --git a/cocos2dx/platform/third_party/win32/pthread/pthread.h b/cocos2dx/platform/third_party/win32/pthread/pthread.h deleted file mode 100644 index f3d2dac966..0000000000 --- a/cocos2dx/platform/third_party/win32/pthread/pthread.h +++ /dev/null @@ -1,1368 +0,0 @@ -/* This is an implementation of the threads API of POSIX 1003.1-2001. - * - * -------------------------------------------------------------------------- - * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2005 Pthreads-win32 contributors - * - * Contact Email: rpj@callisto.canberra.edu.au - * - * The current list of contributors is contained - * in the file CONTRIBUTORS included with the source - * code distribution. The list can also be seen at the - * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ - -#if !defined( PTHREAD_H ) -#define PTHREAD_H - -/* - * See the README file for an explanation of the pthreads-win32 version - * numbering scheme and how the DLL is named etc. - */ -#define PTW32_VERSION 2,8,0,0 -#define PTW32_VERSION_STRING "2, 8, 0, 0\0" - -/* There are three implementations of cancel cleanup. - * Note that pthread.h is included in both application - * compilation units and also internally for the library. - * The code here and within the library aims to work - * for all reasonable combinations of environments. - * - * The three implementations are: - * - * WIN32 SEH - * C - * C++ - * - * Please note that exiting a push/pop block via - * "return", "exit", "break", or "continue" will - * lead to different behaviour amongst applications - * depending upon whether the library was built - * using SEH, C++, or C. For example, a library built - * with SEH will call the cleanup routine, while both - * C++ and C built versions will not. - */ - -/* - * Define defaults for cleanup code. - * Note: Unless the build explicitly defines one of the following, then - * we default to standard C style cleanup. This style uses setjmp/longjmp - * in the cancelation and thread exit implementations and therefore won't - * do stack unwinding if linked to applications that have it (e.g. - * C++ apps). This is currently consistent with most/all commercial Unix - * POSIX threads implementations. - */ -#if !defined( __CLEANUP_SEH ) && !defined( __CLEANUP_CXX ) && !defined( __CLEANUP_C ) -# define __CLEANUP_C -#endif - -#if defined( __CLEANUP_SEH ) && ( !defined( _MSC_VER ) && !defined(PTW32_RC_MSC)) -#error ERROR [__FILE__, line __LINE__]: SEH is not supported for this compiler. -#endif - -/* - * Stop here if we are being included by the resource compiler. - */ -#ifndef RC_INVOKED - -#undef PTW32_LEVEL - -#if defined(_POSIX_SOURCE) -#define PTW32_LEVEL 0 -/* Early POSIX */ -#endif - -#if defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 199309 -#undef PTW32_LEVEL -#define PTW32_LEVEL 1 -/* Include 1b, 1c and 1d */ -#endif - -#if defined(INCLUDE_NP) -#undef PTW32_LEVEL -#define PTW32_LEVEL 2 -/* Include Non-Portable extensions */ -#endif - -#define PTW32_LEVEL_MAX 3 - -#if !defined(PTW32_LEVEL) -#define PTW32_LEVEL PTW32_LEVEL_MAX -/* Include everything */ -#endif - -#ifdef _UWIN -# define HAVE_STRUCT_TIMESPEC 1 -# define HAVE_SIGNAL_H 1 -# undef HAVE_CONFIG_H -# pragma comment(lib, "pthread") -#endif - -/* - * ------------------------------------------------------------- - * - * - * Module: pthread.h - * - * Purpose: - * Provides an implementation of PThreads based upon the - * standard: - * - * POSIX 1003.1-2001 - * and - * The Single Unix Specification version 3 - * - * (these two are equivalent) - * - * in order to enhance code portability between Windows, - * various commercial Unix implementations, and Linux. - * - * See the ANNOUNCE file for a full list of conforming - * routines and defined constants, and a list of missing - * routines and constants not defined in this implementation. - * - * Authors: - * There have been many contributors to this library. - * The initial implementation was contributed by - * John Bossom, and several others have provided major - * sections or revisions of parts of the implementation. - * Often significant effort has been contributed to - * find and fix important bugs and other problems to - * improve the reliability of the library, which sometimes - * is not reflected in the amount of code which changed as - * result. - * As much as possible, the contributors are acknowledged - * in the ChangeLog file in the source code distribution - * where their changes are noted in detail. - * - * Contributors are listed in the CONTRIBUTORS file. - * - * As usual, all bouquets go to the contributors, and all - * brickbats go to the project maintainer. - * - * Maintainer: - * The code base for this project is coordinated and - * eventually pre-tested, packaged, and made available by - * - * Ross Johnson - * - * QA Testers: - * Ultimately, the library is tested in the real world by - * a host of competent and demanding scientists and - * engineers who report bugs and/or provide solutions - * which are then fixed or incorporated into subsequent - * versions of the library. Each time a bug is fixed, a - * test case is written to prove the fix and ensure - * that later changes to the code don't reintroduce the - * same error. The number of test cases is slowly growing - * and therefore so is the code reliability. - * - * Compliance: - * See the file ANNOUNCE for the list of implemented - * and not-implemented routines and defined options. - * Of course, these are all defined is this file as well. - * - * Web site: - * The source code and other information about this library - * are available from - * - * http://sources.redhat.com/pthreads-win32/ - * - * ------------------------------------------------------------- - */ - -/* Try to avoid including windows.h */ -#if defined(__MINGW32__) && defined(__cplusplus) -#define PTW32_INCLUDE_WINDOWS_H -#endif - -#ifdef PTW32_INCLUDE_WINDOWS_H -#include -#endif - -#if defined(_MSC_VER) && _MSC_VER < 1300 || defined(__DMC__) -/* - * VC++6.0 or early compiler's header has no DWORD_PTR type. - */ -typedef unsigned long DWORD_PTR; -#endif -/* - * ----------------- - * autoconf switches - * ----------------- - */ - -#if HAVE_CONFIG_H -#include "config.h" -#endif /* HAVE_CONFIG_H */ - -#ifndef NEED_FTIME -#include -#else /* NEED_FTIME */ -/* use native WIN32 time API */ -#endif /* NEED_FTIME */ - -#if HAVE_SIGNAL_H -#include -#endif /* HAVE_SIGNAL_H */ - -#include -#include - -/* - * Boolean values to make us independent of system includes. - */ -enum { - PTW32_FALSE = 0, - PTW32_TRUE = (! PTW32_FALSE) -}; - -/* - * This is a duplicate of what is in the autoconf config.h, - * which is only used when building the pthread-win32 libraries. - */ - -#ifndef PTW32_CONFIG_H -# if defined(WINCE) -# define NEED_ERRNO -# define NEED_SEM -# endif -# if defined(_UWIN) || defined(__MINGW32__) -# define HAVE_MODE_T -# endif -#endif - -/* - * - */ - -#if PTW32_LEVEL >= PTW32_LEVEL_MAX -#ifdef NEED_ERRNO -#include "need_errno.h" -#else -#include -#endif -#endif /* PTW32_LEVEL >= PTW32_LEVEL_MAX */ - -/* - * Several systems don't define some error numbers. - */ -#ifndef ENOTSUP -# define ENOTSUP 48 /* This is the value in Solaris. */ -#endif - -#ifndef ETIMEDOUT -# define ETIMEDOUT 10060 /* This is the value in winsock.h. */ -#endif - -#ifndef ENOSYS -# define ENOSYS 140 /* Semi-arbitrary value */ -#endif - -#ifndef EDEADLK -# ifdef EDEADLOCK -# define EDEADLK EDEADLOCK -# else -# define EDEADLK 36 /* This is the value in MSVC. */ -# endif -#endif - -#include - -/* - * To avoid including windows.h we define only those things that we - * actually need from it. - */ -#ifndef PTW32_INCLUDE_WINDOWS_H -#ifndef HANDLE -# define PTW32__HANDLE_DEF -# define HANDLE void * -#endif -#ifndef DWORD -# define PTW32__DWORD_DEF -# define DWORD unsigned long -#endif -#endif - -#ifndef HAVE_STRUCT_TIMESPEC -#define HAVE_STRUCT_TIMESPEC 1 -struct timespec { - long tv_sec; - long tv_nsec; -}; -#endif /* HAVE_STRUCT_TIMESPEC */ - -#ifndef SIG_BLOCK -#define SIG_BLOCK 0 -#endif /* SIG_BLOCK */ - -#ifndef SIG_UNBLOCK -#define SIG_UNBLOCK 1 -#endif /* SIG_UNBLOCK */ - -#ifndef SIG_SETMASK -#define SIG_SETMASK 2 -#endif /* SIG_SETMASK */ - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -/* - * ------------------------------------------------------------- - * - * POSIX 1003.1-2001 Options - * ========================= - * - * Options are normally set in , which is not provided - * with pthreads-win32. - * - * For conformance with the Single Unix Specification (version 3), all of the - * options below are defined, and have a value of either -1 (not supported) - * or 200112L (supported). - * - * These options can neither be left undefined nor have a value of 0, because - * either indicates that sysconf(), which is not implemented, may be used at - * runtime to check the status of the option. - * - * _POSIX_THREADS (== 200112L) - * If == 200112L, you can use threads - * - * _POSIX_THREAD_ATTR_STACKSIZE (== 200112L) - * If == 200112L, you can control the size of a thread's - * stack - * pthread_attr_getstacksize - * pthread_attr_setstacksize - * - * _POSIX_THREAD_ATTR_STACKADDR (== -1) - * If == 200112L, you can allocate and control a thread's - * stack. If not supported, the following functions - * will return ENOSYS, indicating they are not - * supported: - * pthread_attr_getstackaddr - * pthread_attr_setstackaddr - * - * _POSIX_THREAD_PRIORITY_SCHEDULING (== -1) - * If == 200112L, you can use realtime scheduling. - * This option indicates that the behaviour of some - * implemented functions conforms to the additional TPS - * requirements in the standard. E.g. rwlocks favour - * writers over readers when threads have equal priority. - * - * _POSIX_THREAD_PRIO_INHERIT (== -1) - * If == 200112L, you can create priority inheritance - * mutexes. - * pthread_mutexattr_getprotocol + - * pthread_mutexattr_setprotocol + - * - * _POSIX_THREAD_PRIO_PROTECT (== -1) - * If == 200112L, you can create priority ceiling mutexes - * Indicates the availability of: - * pthread_mutex_getprioceiling - * pthread_mutex_setprioceiling - * pthread_mutexattr_getprioceiling - * pthread_mutexattr_getprotocol + - * pthread_mutexattr_setprioceiling - * pthread_mutexattr_setprotocol + - * - * _POSIX_THREAD_PROCESS_SHARED (== -1) - * If set, you can create mutexes and condition - * variables that can be shared with another - * process.If set, indicates the availability - * of: - * pthread_mutexattr_getpshared - * pthread_mutexattr_setpshared - * pthread_condattr_getpshared - * pthread_condattr_setpshared - * - * _POSIX_THREAD_SAFE_FUNCTIONS (== 200112L) - * If == 200112L you can use the special *_r library - * functions that provide thread-safe behaviour - * - * _POSIX_READER_WRITER_LOCKS (== 200112L) - * If == 200112L, you can use read/write locks - * - * _POSIX_SPIN_LOCKS (== 200112L) - * If == 200112L, you can use spin locks - * - * _POSIX_BARRIERS (== 200112L) - * If == 200112L, you can use barriers - * - * + These functions provide both 'inherit' and/or - * 'protect' protocol, based upon these macro - * settings. - * - * ------------------------------------------------------------- - */ - -/* - * POSIX Options - */ -#undef _POSIX_THREADS -#define _POSIX_THREADS 200112L - -#undef _POSIX_READER_WRITER_LOCKS -#define _POSIX_READER_WRITER_LOCKS 200112L - -#undef _POSIX_SPIN_LOCKS -#define _POSIX_SPIN_LOCKS 200112L - -#undef _POSIX_BARRIERS -#define _POSIX_BARRIERS 200112L - -#undef _POSIX_THREAD_SAFE_FUNCTIONS -#define _POSIX_THREAD_SAFE_FUNCTIONS 200112L - -#undef _POSIX_THREAD_ATTR_STACKSIZE -#define _POSIX_THREAD_ATTR_STACKSIZE 200112L - -/* - * The following options are not supported - */ -#undef _POSIX_THREAD_ATTR_STACKADDR -#define _POSIX_THREAD_ATTR_STACKADDR -1 - -#undef _POSIX_THREAD_PRIO_INHERIT -#define _POSIX_THREAD_PRIO_INHERIT -1 - -#undef _POSIX_THREAD_PRIO_PROTECT -#define _POSIX_THREAD_PRIO_PROTECT -1 - -/* TPS is not fully supported. */ -#undef _POSIX_THREAD_PRIORITY_SCHEDULING -#define _POSIX_THREAD_PRIORITY_SCHEDULING -1 - -#undef _POSIX_THREAD_PROCESS_SHARED -#define _POSIX_THREAD_PROCESS_SHARED -1 - - -/* - * POSIX 1003.1-2001 Limits - * =========================== - * - * These limits are normally set in , which is not provided with - * pthreads-win32. - * - * PTHREAD_DESTRUCTOR_ITERATIONS - * Maximum number of attempts to destroy - * a thread's thread-specific data on - * termination (must be at least 4) - * - * PTHREAD_KEYS_MAX - * Maximum number of thread-specific data keys - * available per process (must be at least 128) - * - * PTHREAD_STACK_MIN - * Minimum supported stack size for a thread - * - * PTHREAD_THREADS_MAX - * Maximum number of threads supported per - * process (must be at least 64). - * - * SEM_NSEMS_MAX - * The maximum number of semaphores a process can have. - * (must be at least 256) - * - * SEM_VALUE_MAX - * The maximum value a semaphore can have. - * (must be at least 32767) - * - */ -#undef _POSIX_THREAD_DESTRUCTOR_ITERATIONS -#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4 - -#undef PTHREAD_DESTRUCTOR_ITERATIONS -#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS - -#undef _POSIX_THREAD_KEYS_MAX -#define _POSIX_THREAD_KEYS_MAX 128 - -#undef PTHREAD_KEYS_MAX -#define PTHREAD_KEYS_MAX _POSIX_THREAD_KEYS_MAX - -#undef PTHREAD_STACK_MIN -#define PTHREAD_STACK_MIN 0 - -#undef _POSIX_THREAD_THREADS_MAX -#define _POSIX_THREAD_THREADS_MAX 64 - - /* Arbitrary value */ -#undef PTHREAD_THREADS_MAX -#define PTHREAD_THREADS_MAX 2019 - -#undef _POSIX_SEM_NSEMS_MAX -#define _POSIX_SEM_NSEMS_MAX 256 - - /* Arbitrary value */ -#undef SEM_NSEMS_MAX -#define SEM_NSEMS_MAX 1024 - -#undef _POSIX_SEM_VALUE_MAX -#define _POSIX_SEM_VALUE_MAX 32767 - -#undef SEM_VALUE_MAX -#define SEM_VALUE_MAX INT_MAX - - -#if __GNUC__ && ! defined (__declspec) -# error Please upgrade your GNU compiler to one that supports __declspec. -#endif - -/* - * When building the DLL code, you should define PTW32_BUILD so that - * the variables/functions are exported correctly. When using the DLL, - * do NOT define PTW32_BUILD, and then the variables/functions will - * be imported correctly. - */ -#ifndef PTW32_STATIC_LIB -# ifdef PTW32_BUILD -# define PTW32_DLLPORT __declspec (dllexport) -# else -# define PTW32_DLLPORT __declspec (dllimport) -# endif -#else -# define PTW32_DLLPORT -#endif - -/* - * The Open Watcom C/C++ compiler uses a non-standard calling convention - * that passes function args in registers unless __cdecl is explicitly specified - * in exposed function prototypes. - * - * We force all calls to cdecl even though this could slow Watcom code down - * slightly. If you know that the Watcom compiler will be used to build both - * the DLL and application, then you can probably define this as a null string. - * Remember that pthread.h (this file) is used for both the DLL and application builds. - */ -#define PTW32_CDECL __cdecl - -#if defined(_UWIN) && PTW32_LEVEL >= PTW32_LEVEL_MAX -# include -#else -/* - * Generic handle type - intended to extend uniqueness beyond - * that available with a simple pointer. It should scale for either - * IA-32 or IA-64. - */ -typedef struct { - void * p; /* Pointer to actual object */ - unsigned int x; /* Extra information - reuse count etc */ -} ptw32_handle_t; - -typedef ptw32_handle_t pthread_t; -typedef struct pthread_attr_t_ * pthread_attr_t; -typedef struct pthread_once_t_ pthread_once_t; -typedef struct pthread_key_t_ * pthread_key_t; -typedef struct pthread_mutex_t_ * pthread_mutex_t; -typedef struct pthread_mutexattr_t_ * pthread_mutexattr_t; -typedef struct pthread_cond_t_ * pthread_cond_t; -typedef struct pthread_condattr_t_ * pthread_condattr_t; -#endif -typedef struct pthread_rwlock_t_ * pthread_rwlock_t; -typedef struct pthread_rwlockattr_t_ * pthread_rwlockattr_t; -typedef struct pthread_spinlock_t_ * pthread_spinlock_t; -typedef struct pthread_barrier_t_ * pthread_barrier_t; -typedef struct pthread_barrierattr_t_ * pthread_barrierattr_t; - -/* - * ==================== - * ==================== - * POSIX Threads - * ==================== - * ==================== - */ - -enum { -/* - * pthread_attr_{get,set}detachstate - */ - PTHREAD_CREATE_JOINABLE = 0, /* Default */ - PTHREAD_CREATE_DETACHED = 1, - -/* - * pthread_attr_{get,set}inheritsched - */ - PTHREAD_INHERIT_SCHED = 0, - PTHREAD_EXPLICIT_SCHED = 1, /* Default */ - -/* - * pthread_{get,set}scope - */ - PTHREAD_SCOPE_PROCESS = 0, - PTHREAD_SCOPE_SYSTEM = 1, /* Default */ - -/* - * pthread_setcancelstate paramters - */ - PTHREAD_CANCEL_ENABLE = 0, /* Default */ - PTHREAD_CANCEL_DISABLE = 1, - -/* - * pthread_setcanceltype parameters - */ - PTHREAD_CANCEL_ASYNCHRONOUS = 0, - PTHREAD_CANCEL_DEFERRED = 1, /* Default */ - -/* - * pthread_mutexattr_{get,set}pshared - * pthread_condattr_{get,set}pshared - */ - PTHREAD_PROCESS_PRIVATE = 0, - PTHREAD_PROCESS_SHARED = 1, - -/* - * pthread_barrier_wait - */ - PTHREAD_BARRIER_SERIAL_THREAD = -1 -}; - -/* - * ==================== - * ==================== - * Cancelation - * ==================== - * ==================== - */ -#define PTHREAD_CANCELED ((void *) -1) - - -/* - * ==================== - * ==================== - * Once Key - * ==================== - * ==================== - */ -#define PTHREAD_ONCE_INIT { PTW32_FALSE, 0, 0, 0} - -struct pthread_once_t_ -{ - int done; /* indicates if user function has been executed */ - void * lock; - int reserved1; - int reserved2; -}; - - -/* - * ==================== - * ==================== - * Object initialisers - * ==================== - * ==================== - */ -#define PTHREAD_MUTEX_INITIALIZER ((pthread_mutex_t) -1) -#define PTHREAD_RECURSIVE_MUTEX_INITIALIZER ((pthread_mutex_t) -2) -#define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER ((pthread_mutex_t) -3) - -/* - * Compatibility with LinuxThreads - */ -#define PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP PTHREAD_RECURSIVE_MUTEX_INITIALIZER -#define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP PTHREAD_ERRORCHECK_MUTEX_INITIALIZER - -#define PTHREAD_COND_INITIALIZER ((pthread_cond_t) -1) - -#define PTHREAD_RWLOCK_INITIALIZER ((pthread_rwlock_t) -1) - -#define PTHREAD_SPINLOCK_INITIALIZER ((pthread_spinlock_t) -1) - - -/* - * Mutex types. - */ -enum -{ - /* Compatibility with LinuxThreads */ - PTHREAD_MUTEX_FAST_NP, - PTHREAD_MUTEX_RECURSIVE_NP, - PTHREAD_MUTEX_ERRORCHECK_NP, - PTHREAD_MUTEX_TIMED_NP = PTHREAD_MUTEX_FAST_NP, - PTHREAD_MUTEX_ADAPTIVE_NP = PTHREAD_MUTEX_FAST_NP, - /* For compatibility with POSIX */ - PTHREAD_MUTEX_NORMAL = PTHREAD_MUTEX_FAST_NP, - PTHREAD_MUTEX_RECURSIVE = PTHREAD_MUTEX_RECURSIVE_NP, - PTHREAD_MUTEX_ERRORCHECK = PTHREAD_MUTEX_ERRORCHECK_NP, - PTHREAD_MUTEX_DEFAULT = PTHREAD_MUTEX_NORMAL -}; - - -typedef struct ptw32_cleanup_t ptw32_cleanup_t; - -#if defined(_MSC_VER) -/* Disable MSVC 'anachronism used' warning */ -#pragma warning( disable : 4229 ) -#endif - -typedef void (* PTW32_CDECL ptw32_cleanup_callback_t)(void *); - -#if defined(_MSC_VER) -#pragma warning( default : 4229 ) -#endif - -struct ptw32_cleanup_t -{ - ptw32_cleanup_callback_t routine; - void *arg; - struct ptw32_cleanup_t *prev; -}; - -#ifdef __CLEANUP_SEH - /* - * WIN32 SEH version of cancel cleanup. - */ - -#define pthread_cleanup_push( _rout, _arg ) \ - { \ - ptw32_cleanup_t _cleanup; \ - \ - _cleanup.routine = (ptw32_cleanup_callback_t)(_rout); \ - _cleanup.arg = (_arg); \ - __try \ - { \ - -#define pthread_cleanup_pop( _execute ) \ - } \ - __finally \ - { \ - if( _execute || AbnormalTermination()) \ - { \ - (*(_cleanup.routine))( _cleanup.arg ); \ - } \ - } \ - } - -#else /* __CLEANUP_SEH */ - -#ifdef __CLEANUP_C - - /* - * C implementation of PThreads cancel cleanup - */ - -#define pthread_cleanup_push( _rout, _arg ) \ - { \ - ptw32_cleanup_t _cleanup; \ - \ - ptw32_push_cleanup( &_cleanup, (ptw32_cleanup_callback_t) (_rout), (_arg) ); \ - -#define pthread_cleanup_pop( _execute ) \ - (void) ptw32_pop_cleanup( _execute ); \ - } - -#else /* __CLEANUP_C */ - -#ifdef __CLEANUP_CXX - - /* - * C++ version of cancel cleanup. - * - John E. Bossom. - */ - - class PThreadCleanup { - /* - * PThreadCleanup - * - * Purpose - * This class is a C++ helper class that is - * used to implement pthread_cleanup_push/ - * pthread_cleanup_pop. - * The destructor of this class automatically - * pops the pushed cleanup routine regardless - * of how the code exits the scope - * (i.e. such as by an exception) - */ - ptw32_cleanup_callback_t cleanUpRout; - void * obj; - int executeIt; - - public: - PThreadCleanup() : - cleanUpRout( 0 ), - obj( 0 ), - executeIt( 0 ) - /* - * No cleanup performed - */ - { - } - - PThreadCleanup( - ptw32_cleanup_callback_t routine, - void * arg ) : - cleanUpRout( routine ), - obj( arg ), - executeIt( 1 ) - /* - * Registers a cleanup routine for 'arg' - */ - { - } - - ~PThreadCleanup() - { - if ( executeIt && ((void *) cleanUpRout != (void *) 0) ) - { - (void) (*cleanUpRout)( obj ); - } - } - - void execute( int exec ) - { - executeIt = exec; - } - }; - - /* - * C++ implementation of PThreads cancel cleanup; - * This implementation takes advantage of a helper - * class who's destructor automatically calls the - * cleanup routine if we exit our scope weirdly - */ -#define pthread_cleanup_push( _rout, _arg ) \ - { \ - PThreadCleanup cleanup((ptw32_cleanup_callback_t)(_rout), \ - (void *) (_arg) ); - -#define pthread_cleanup_pop( _execute ) \ - cleanup.execute( _execute ); \ - } - -#else - -#error ERROR [__FILE__, line __LINE__]: Cleanup type undefined. - -#endif /* __CLEANUP_CXX */ - -#endif /* __CLEANUP_C */ - -#endif /* __CLEANUP_SEH */ - -/* - * =============== - * =============== - * Methods - * =============== - * =============== - */ - -/* - * PThread Attribute Functions - */ -PTW32_DLLPORT int PTW32_CDECL pthread_attr_init (pthread_attr_t * attr); - -PTW32_DLLPORT int PTW32_CDECL pthread_attr_destroy (pthread_attr_t * attr); - -PTW32_DLLPORT int PTW32_CDECL pthread_attr_getdetachstate (const pthread_attr_t * attr, - int *detachstate); - -PTW32_DLLPORT int PTW32_CDECL pthread_attr_getstackaddr (const pthread_attr_t * attr, - void **stackaddr); - -PTW32_DLLPORT int PTW32_CDECL pthread_attr_getstacksize (const pthread_attr_t * attr, - size_t * stacksize); - -PTW32_DLLPORT int PTW32_CDECL pthread_attr_setdetachstate (pthread_attr_t * attr, - int detachstate); - -PTW32_DLLPORT int PTW32_CDECL pthread_attr_setstackaddr (pthread_attr_t * attr, - void *stackaddr); - -PTW32_DLLPORT int PTW32_CDECL pthread_attr_setstacksize (pthread_attr_t * attr, - size_t stacksize); - -PTW32_DLLPORT int PTW32_CDECL pthread_attr_getschedparam (const pthread_attr_t *attr, - struct sched_param *param); - -PTW32_DLLPORT int PTW32_CDECL pthread_attr_setschedparam (pthread_attr_t *attr, - const struct sched_param *param); - -PTW32_DLLPORT int PTW32_CDECL pthread_attr_setschedpolicy (pthread_attr_t *, - int); - -PTW32_DLLPORT int PTW32_CDECL pthread_attr_getschedpolicy (pthread_attr_t *, - int *); - -PTW32_DLLPORT int PTW32_CDECL pthread_attr_setinheritsched(pthread_attr_t * attr, - int inheritsched); - -PTW32_DLLPORT int PTW32_CDECL pthread_attr_getinheritsched(pthread_attr_t * attr, - int * inheritsched); - -PTW32_DLLPORT int PTW32_CDECL pthread_attr_setscope (pthread_attr_t *, - int); - -PTW32_DLLPORT int PTW32_CDECL pthread_attr_getscope (const pthread_attr_t *, - int *); - -/* - * PThread Functions - */ -PTW32_DLLPORT int PTW32_CDECL pthread_create (pthread_t * tid, - const pthread_attr_t * attr, - void *(*start) (void *), - void *arg); - -PTW32_DLLPORT int PTW32_CDECL pthread_detach (pthread_t tid); - -PTW32_DLLPORT int PTW32_CDECL pthread_equal (pthread_t t1, - pthread_t t2); - -PTW32_DLLPORT void PTW32_CDECL pthread_exit (void *value_ptr); - -PTW32_DLLPORT int PTW32_CDECL pthread_join (pthread_t thread, - void **value_ptr); - -PTW32_DLLPORT pthread_t PTW32_CDECL pthread_self (void); - -PTW32_DLLPORT int PTW32_CDECL pthread_cancel (pthread_t thread); - -PTW32_DLLPORT int PTW32_CDECL pthread_setcancelstate (int state, - int *oldstate); - -PTW32_DLLPORT int PTW32_CDECL pthread_setcanceltype (int type, - int *oldtype); - -PTW32_DLLPORT void PTW32_CDECL pthread_testcancel (void); - -PTW32_DLLPORT int PTW32_CDECL pthread_once (pthread_once_t * once_control, - void (*init_routine) (void)); - -#if PTW32_LEVEL >= PTW32_LEVEL_MAX -PTW32_DLLPORT ptw32_cleanup_t * PTW32_CDECL ptw32_pop_cleanup (int execute); - -PTW32_DLLPORT void PTW32_CDECL ptw32_push_cleanup (ptw32_cleanup_t * cleanup, - void (*routine) (void *), - void *arg); -#endif /* PTW32_LEVEL >= PTW32_LEVEL_MAX */ - -/* - * Thread Specific Data Functions - */ -PTW32_DLLPORT int PTW32_CDECL pthread_key_create (pthread_key_t * key, - void (*destructor) (void *)); - -PTW32_DLLPORT int PTW32_CDECL pthread_key_delete (pthread_key_t key); - -PTW32_DLLPORT int PTW32_CDECL pthread_setspecific (pthread_key_t key, - const void *value); - -PTW32_DLLPORT void * PTW32_CDECL pthread_getspecific (pthread_key_t key); - - -/* - * Mutex Attribute Functions - */ -PTW32_DLLPORT int PTW32_CDECL pthread_mutexattr_init (pthread_mutexattr_t * attr); - -PTW32_DLLPORT int PTW32_CDECL pthread_mutexattr_destroy (pthread_mutexattr_t * attr); - -PTW32_DLLPORT int PTW32_CDECL pthread_mutexattr_getpshared (const pthread_mutexattr_t - * attr, - int *pshared); - -PTW32_DLLPORT int PTW32_CDECL pthread_mutexattr_setpshared (pthread_mutexattr_t * attr, - int pshared); - -PTW32_DLLPORT int PTW32_CDECL pthread_mutexattr_settype (pthread_mutexattr_t * attr, int kind); -PTW32_DLLPORT int PTW32_CDECL pthread_mutexattr_gettype (pthread_mutexattr_t * attr, int *kind); - -/* - * Barrier Attribute Functions - */ -PTW32_DLLPORT int PTW32_CDECL pthread_barrierattr_init (pthread_barrierattr_t * attr); - -PTW32_DLLPORT int PTW32_CDECL pthread_barrierattr_destroy (pthread_barrierattr_t * attr); - -PTW32_DLLPORT int PTW32_CDECL pthread_barrierattr_getpshared (const pthread_barrierattr_t - * attr, - int *pshared); - -PTW32_DLLPORT int PTW32_CDECL pthread_barrierattr_setpshared (pthread_barrierattr_t * attr, - int pshared); - -/* - * Mutex Functions - */ -PTW32_DLLPORT int PTW32_CDECL pthread_mutex_init (pthread_mutex_t * mutex, - const pthread_mutexattr_t * attr); - -PTW32_DLLPORT int PTW32_CDECL pthread_mutex_destroy (pthread_mutex_t * mutex); - -PTW32_DLLPORT int PTW32_CDECL pthread_mutex_lock (pthread_mutex_t * mutex); - -PTW32_DLLPORT int PTW32_CDECL pthread_mutex_timedlock(pthread_mutex_t *mutex, - const struct timespec *abstime); - -PTW32_DLLPORT int PTW32_CDECL pthread_mutex_trylock (pthread_mutex_t * mutex); - -PTW32_DLLPORT int PTW32_CDECL pthread_mutex_unlock (pthread_mutex_t * mutex); - -/* - * Spinlock Functions - */ -PTW32_DLLPORT int PTW32_CDECL pthread_spin_init (pthread_spinlock_t * lock, int pshared); - -PTW32_DLLPORT int PTW32_CDECL pthread_spin_destroy (pthread_spinlock_t * lock); - -PTW32_DLLPORT int PTW32_CDECL pthread_spin_lock (pthread_spinlock_t * lock); - -PTW32_DLLPORT int PTW32_CDECL pthread_spin_trylock (pthread_spinlock_t * lock); - -PTW32_DLLPORT int PTW32_CDECL pthread_spin_unlock (pthread_spinlock_t * lock); - -/* - * Barrier Functions - */ -PTW32_DLLPORT int PTW32_CDECL pthread_barrier_init (pthread_barrier_t * barrier, - const pthread_barrierattr_t * attr, - unsigned int count); - -PTW32_DLLPORT int PTW32_CDECL pthread_barrier_destroy (pthread_barrier_t * barrier); - -PTW32_DLLPORT int PTW32_CDECL pthread_barrier_wait (pthread_barrier_t * barrier); - -/* - * Condition Variable Attribute Functions - */ -PTW32_DLLPORT int PTW32_CDECL pthread_condattr_init (pthread_condattr_t * attr); - -PTW32_DLLPORT int PTW32_CDECL pthread_condattr_destroy (pthread_condattr_t * attr); - -PTW32_DLLPORT int PTW32_CDECL pthread_condattr_getpshared (const pthread_condattr_t * attr, - int *pshared); - -PTW32_DLLPORT int PTW32_CDECL pthread_condattr_setpshared (pthread_condattr_t * attr, - int pshared); - -/* - * Condition Variable Functions - */ -PTW32_DLLPORT int PTW32_CDECL pthread_cond_init (pthread_cond_t * cond, - const pthread_condattr_t * attr); - -PTW32_DLLPORT int PTW32_CDECL pthread_cond_destroy (pthread_cond_t * cond); - -PTW32_DLLPORT int PTW32_CDECL pthread_cond_wait (pthread_cond_t * cond, - pthread_mutex_t * mutex); - -PTW32_DLLPORT int PTW32_CDECL pthread_cond_timedwait (pthread_cond_t * cond, - pthread_mutex_t * mutex, - const struct timespec *abstime); - -PTW32_DLLPORT int PTW32_CDECL pthread_cond_signal (pthread_cond_t * cond); - -PTW32_DLLPORT int PTW32_CDECL pthread_cond_broadcast (pthread_cond_t * cond); - -/* - * Scheduling - */ -PTW32_DLLPORT int PTW32_CDECL pthread_setschedparam (pthread_t thread, - int policy, - const struct sched_param *param); - -PTW32_DLLPORT int PTW32_CDECL pthread_getschedparam (pthread_t thread, - int *policy, - struct sched_param *param); - -PTW32_DLLPORT int PTW32_CDECL pthread_setconcurrency (int); - -PTW32_DLLPORT int PTW32_CDECL pthread_getconcurrency (void); - -/* - * Read-Write Lock Functions - */ -PTW32_DLLPORT int PTW32_CDECL pthread_rwlock_init(pthread_rwlock_t *lock, - const pthread_rwlockattr_t *attr); - -PTW32_DLLPORT int PTW32_CDECL pthread_rwlock_destroy(pthread_rwlock_t *lock); - -PTW32_DLLPORT int PTW32_CDECL pthread_rwlock_tryrdlock(pthread_rwlock_t *); - -PTW32_DLLPORT int PTW32_CDECL pthread_rwlock_trywrlock(pthread_rwlock_t *); - -PTW32_DLLPORT int PTW32_CDECL pthread_rwlock_rdlock(pthread_rwlock_t *lock); - -PTW32_DLLPORT int PTW32_CDECL pthread_rwlock_timedrdlock(pthread_rwlock_t *lock, - const struct timespec *abstime); - -PTW32_DLLPORT int PTW32_CDECL pthread_rwlock_wrlock(pthread_rwlock_t *lock); - -PTW32_DLLPORT int PTW32_CDECL pthread_rwlock_timedwrlock(pthread_rwlock_t *lock, - const struct timespec *abstime); - -PTW32_DLLPORT int PTW32_CDECL pthread_rwlock_unlock(pthread_rwlock_t *lock); - -PTW32_DLLPORT int PTW32_CDECL pthread_rwlockattr_init (pthread_rwlockattr_t * attr); - -PTW32_DLLPORT int PTW32_CDECL pthread_rwlockattr_destroy (pthread_rwlockattr_t * attr); - -PTW32_DLLPORT int PTW32_CDECL pthread_rwlockattr_getpshared (const pthread_rwlockattr_t * attr, - int *pshared); - -PTW32_DLLPORT int PTW32_CDECL pthread_rwlockattr_setpshared (pthread_rwlockattr_t * attr, - int pshared); - -#if PTW32_LEVEL >= PTW32_LEVEL_MAX - 1 - -/* - * Signal Functions. Should be defined in but MSVC and MinGW32 - * already have signal.h that don't define these. - */ -PTW32_DLLPORT int PTW32_CDECL pthread_kill(pthread_t thread, int sig); - -/* - * Non-portable functions - */ - -/* - * Compatibility with Linux. - */ -PTW32_DLLPORT int PTW32_CDECL pthread_mutexattr_setkind_np(pthread_mutexattr_t * attr, - int kind); -PTW32_DLLPORT int PTW32_CDECL pthread_mutexattr_getkind_np(pthread_mutexattr_t * attr, - int *kind); - -/* - * Possibly supported by other POSIX threads implementations - */ -PTW32_DLLPORT int PTW32_CDECL pthread_delay_np (struct timespec * interval); -PTW32_DLLPORT int PTW32_CDECL pthread_num_processors_np(void); - -/* - * Useful if an application wants to statically link - * the lib rather than load the DLL at run-time. - */ -PTW32_DLLPORT int PTW32_CDECL pthread_win32_process_attach_np(void); -PTW32_DLLPORT int PTW32_CDECL pthread_win32_process_detach_np(void); -PTW32_DLLPORT int PTW32_CDECL pthread_win32_thread_attach_np(void); -PTW32_DLLPORT int PTW32_CDECL pthread_win32_thread_detach_np(void); - -/* - * Features that are auto-detected at load/run time. - */ -PTW32_DLLPORT int PTW32_CDECL pthread_win32_test_features_np(int); -enum ptw32_features { - PTW32_SYSTEM_INTERLOCKED_COMPARE_EXCHANGE = 0x0001, /* System provides it. */ - PTW32_ALERTABLE_ASYNC_CANCEL = 0x0002 /* Can cancel blocked threads. */ -}; - -/* - * Register a system time change with the library. - * Causes the library to perform various functions - * in response to the change. Should be called whenever - * the application's top level window receives a - * WM_TIMECHANGE message. It can be passed directly to - * pthread_create() as a new thread if desired. - */ -PTW32_DLLPORT void * PTW32_CDECL pthread_timechange_handler_np(void *); - -#endif /*PTW32_LEVEL >= PTW32_LEVEL_MAX - 1 */ - -#if PTW32_LEVEL >= PTW32_LEVEL_MAX - -/* - * Returns the Win32 HANDLE for the POSIX thread. - */ -PTW32_DLLPORT HANDLE PTW32_CDECL pthread_getw32threadhandle_np(pthread_t thread); - - -/* - * Protected Methods - * - * This function blocks until the given WIN32 handle - * is signaled or pthread_cancel had been called. - * This function allows the caller to hook into the - * PThreads cancel mechanism. It is implemented using - * - * WaitForMultipleObjects - * - * on 'waitHandle' and a manually reset WIN32 Event - * used to implement pthread_cancel. The 'timeout' - * argument to TimedWait is simply passed to - * WaitForMultipleObjects. - */ -PTW32_DLLPORT int PTW32_CDECL pthreadCancelableWait (HANDLE waitHandle); -PTW32_DLLPORT int PTW32_CDECL pthreadCancelableTimedWait (HANDLE waitHandle, - DWORD timeout); - -#endif /* PTW32_LEVEL >= PTW32_LEVEL_MAX */ - -/* - * Thread-Safe C Runtime Library Mappings. - */ -#ifndef _UWIN -# if defined(NEED_ERRNO) - PTW32_DLLPORT int * PTW32_CDECL _errno( void ); -# else -# ifndef errno -# if (defined(_MT) || defined(_DLL)) - __declspec(dllimport) extern int * __cdecl _errno(void); -# define errno (*_errno()) -# endif -# endif -# endif -#endif - -/* - * WIN32 C runtime library had been made thread-safe - * without affecting the user interface. Provide - * mappings from the UNIX thread-safe versions to - * the standard C runtime library calls. - * Only provide function mappings for functions that - * actually exist on WIN32. - */ - -#if !defined(__MINGW32__) -#define strtok_r( _s, _sep, _lasts ) \ - ( *(_lasts) = strtok( (_s), (_sep) ) ) -#endif /* !__MINGW32__ */ - -#define asctime_r( _tm, _buf ) \ - ( strcpy( (_buf), asctime( (_tm) ) ), \ - (_buf) ) - -#define ctime_r( _clock, _buf ) \ - ( strcpy( (_buf), ctime( (_clock) ) ), \ - (_buf) ) - -#define gmtime_r( _clock, _result ) \ - ( *(_result) = *gmtime( (_clock) ), \ - (_result) ) - -#define localtime_r( _clock, _result ) \ - ( *(_result) = *localtime( (_clock) ), \ - (_result) ) - -#define rand_r( _seed ) \ - ( _seed == _seed? rand() : rand() ) - - -/* - * Some compiler environments don't define some things. - */ -#if defined(__BORLANDC__) -# define _ftime ftime -# define _timeb timeb -#endif - -#ifdef __cplusplus - -/* - * Internal exceptions - */ -class ptw32_exception {}; -class ptw32_exception_cancel : public ptw32_exception {}; -class ptw32_exception_exit : public ptw32_exception {}; - -#endif - -#if PTW32_LEVEL >= PTW32_LEVEL_MAX - -/* FIXME: This is only required if the library was built using SEH */ -/* - * Get internal SEH tag - */ -PTW32_DLLPORT DWORD PTW32_CDECL ptw32_get_exception_services_code(void); - -#endif /* PTW32_LEVEL >= PTW32_LEVEL_MAX */ - -#ifndef PTW32_BUILD - -#ifdef __CLEANUP_SEH - -/* - * Redefine the SEH __except keyword to ensure that applications - * propagate our internal exceptions up to the library's internal handlers. - */ -#define __except( E ) \ - __except( ( GetExceptionCode() == ptw32_get_exception_services_code() ) \ - ? EXCEPTION_CONTINUE_SEARCH : ( E ) ) - -#endif /* __CLEANUP_SEH */ - -#ifdef __CLEANUP_CXX - -/* - * Redefine the C++ catch keyword to ensure that applications - * propagate our internal exceptions up to the library's internal handlers. - */ -#ifdef _MSC_VER - /* - * WARNING: Replace any 'catch( ... )' with 'PtW32CatchAll' - * if you want Pthread-Win32 cancelation and pthread_exit to work. - */ - -#ifndef PtW32NoCatchWarn - -#pragma message("Specify \"/DPtW32NoCatchWarn\" compiler flag to skip this message.") -#pragma message("------------------------------------------------------------------") -#pragma message("When compiling applications with MSVC++ and C++ exception handling:") -#pragma message(" Replace any 'catch( ... )' in routines called from POSIX threads") -#pragma message(" with 'PtW32CatchAll' or 'CATCHALL' if you want POSIX thread") -#pragma message(" cancelation and pthread_exit to work. For example:") -#pragma message("") -#pragma message(" #ifdef PtW32CatchAll") -#pragma message(" PtW32CatchAll") -#pragma message(" #else") -#pragma message(" catch(...)") -#pragma message(" #endif") -#pragma message(" {") -#pragma message(" /* Catchall block processing */") -#pragma message(" }") -#pragma message("------------------------------------------------------------------") - -#endif - -#define PtW32CatchAll \ - catch( ptw32_exception & ) { throw; } \ - catch( ... ) - -#else /* _MSC_VER */ - -#define catch( E ) \ - catch( ptw32_exception & ) { throw; } \ - catch( E ) - -#endif /* _MSC_VER */ - -#endif /* __CLEANUP_CXX */ - -#endif /* ! PTW32_BUILD */ - -#ifdef __cplusplus -} /* End of extern "C" */ -#endif /* __cplusplus */ - -#ifdef PTW32__HANDLE_DEF -# undef HANDLE -#endif -#ifdef PTW32__DWORD_DEF -# undef DWORD -#endif - -#undef PTW32_LEVEL -#undef PTW32_LEVEL_MAX - -#endif /* ! RC_INVOKED */ - -#endif /* PTHREAD_H */ diff --git a/cocos2dx/platform/third_party/win32/pthread/sched.h b/cocos2dx/platform/third_party/win32/pthread/sched.h deleted file mode 100644 index dfb8e934af..0000000000 --- a/cocos2dx/platform/third_party/win32/pthread/sched.h +++ /dev/null @@ -1,178 +0,0 @@ -/* - * Module: sched.h - * - * Purpose: - * Provides an implementation of POSIX realtime extensions - * as defined in - * - * POSIX 1003.1b-1993 (POSIX.1b) - * - * -------------------------------------------------------------------------- - * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2005 Pthreads-win32 contributors - * - * Contact Email: rpj@callisto.canberra.edu.au - * - * The current list of contributors is contained - * in the file CONTRIBUTORS included with the source - * code distribution. The list can also be seen at the - * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ -#ifndef _SCHED_H -#define _SCHED_H - -#undef PTW32_LEVEL - -#if defined(_POSIX_SOURCE) -#define PTW32_LEVEL 0 -/* Early POSIX */ -#endif - -#if defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 199309 -#undef PTW32_LEVEL -#define PTW32_LEVEL 1 -/* Include 1b, 1c and 1d */ -#endif - -#if defined(INCLUDE_NP) -#undef PTW32_LEVEL -#define PTW32_LEVEL 2 -/* Include Non-Portable extensions */ -#endif - -#define PTW32_LEVEL_MAX 3 - -#if !defined(PTW32_LEVEL) -#define PTW32_LEVEL PTW32_LEVEL_MAX -/* Include everything */ -#endif - - -#if __GNUC__ && ! defined (__declspec) -# error Please upgrade your GNU compiler to one that supports __declspec. -#endif - -/* - * When building the DLL code, you should define PTW32_BUILD so that - * the variables/functions are exported correctly. When using the DLL, - * do NOT define PTW32_BUILD, and then the variables/functions will - * be imported correctly. - */ -#ifndef PTW32_STATIC_LIB -# ifdef PTW32_BUILD -# define PTW32_DLLPORT __declspec (dllexport) -# else -# define PTW32_DLLPORT __declspec (dllimport) -# endif -#else -# define PTW32_DLLPORT -#endif - -/* - * This is a duplicate of what is in the autoconf config.h, - * which is only used when building the pthread-win32 libraries. - */ - -#ifndef PTW32_CONFIG_H -# if defined(WINCE) -# define NEED_ERRNO -# define NEED_SEM -# endif -# if defined(_UWIN) || defined(__MINGW32__) -# define HAVE_MODE_T -# endif -#endif - -/* - * - */ - -#if PTW32_LEVEL >= PTW32_LEVEL_MAX -#ifdef NEED_ERRNO -#include "need_errno.h" -#else -#include -#endif -#endif /* PTW32_LEVEL >= PTW32_LEVEL_MAX */ - -#if defined(__MINGW32__) || defined(_UWIN) -#if PTW32_LEVEL >= PTW32_LEVEL_MAX -/* For pid_t */ -# include -/* Required by Unix 98 */ -# include -#endif /* PTW32_LEVEL >= PTW32_LEVEL_MAX */ -#else -typedef int pid_t; -#endif - -/* Thread scheduling policies */ - -enum { - SCHED_OTHER = 0, - SCHED_FIFO, - SCHED_RR, - SCHED_MIN = SCHED_OTHER, - SCHED_MAX = SCHED_RR -}; - -struct sched_param { - int sched_priority; -}; - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -PTW32_DLLPORT int __cdecl sched_yield (void); - -PTW32_DLLPORT int __cdecl sched_get_priority_min (int policy); - -PTW32_DLLPORT int __cdecl sched_get_priority_max (int policy); - -PTW32_DLLPORT int __cdecl sched_setscheduler (pid_t pid, int policy); - -PTW32_DLLPORT int __cdecl sched_getscheduler (pid_t pid); - -/* - * Note that this macro returns ENOTSUP rather than - * ENOSYS as might be expected. However, returning ENOSYS - * should mean that sched_get_priority_{min,max} are - * not implemented as well as sched_rr_get_interval. - * This is not the case, since we just don't support - * round-robin scheduling. Therefore I have chosen to - * return the same value as sched_setscheduler when - * SCHED_RR is passed to it. - */ -#define sched_rr_get_interval(_pid, _interval) \ - ( errno = ENOTSUP, (int) -1 ) - - -#ifdef __cplusplus -} /* End of extern "C" */ -#endif /* __cplusplus */ - -#undef PTW32_LEVEL -#undef PTW32_LEVEL_MAX - -#endif /* !_SCHED_H */ - diff --git a/cocos2dx/platform/third_party/win32/pthread/semaphore.h b/cocos2dx/platform/third_party/win32/pthread/semaphore.h deleted file mode 100644 index bdcc2c7ea7..0000000000 --- a/cocos2dx/platform/third_party/win32/pthread/semaphore.h +++ /dev/null @@ -1,166 +0,0 @@ -/* - * Module: semaphore.h - * - * Purpose: - * Semaphores aren't actually part of the PThreads standard. - * They are defined by the POSIX Standard: - * - * POSIX 1003.1b-1993 (POSIX.1b) - * - * -------------------------------------------------------------------------- - * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2005 Pthreads-win32 contributors - * - * Contact Email: rpj@callisto.canberra.edu.au - * - * The current list of contributors is contained - * in the file CONTRIBUTORS included with the source - * code distribution. The list can also be seen at the - * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ -#if !defined( SEMAPHORE_H ) -#define SEMAPHORE_H - -#undef PTW32_LEVEL - -#if defined(_POSIX_SOURCE) -#define PTW32_LEVEL 0 -/* Early POSIX */ -#endif - -#if defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 199309 -#undef PTW32_LEVEL -#define PTW32_LEVEL 1 -/* Include 1b, 1c and 1d */ -#endif - -#if defined(INCLUDE_NP) -#undef PTW32_LEVEL -#define PTW32_LEVEL 2 -/* Include Non-Portable extensions */ -#endif - -#define PTW32_LEVEL_MAX 3 - -#if !defined(PTW32_LEVEL) -#define PTW32_LEVEL PTW32_LEVEL_MAX -/* Include everything */ -#endif - -#if __GNUC__ && ! defined (__declspec) -# error Please upgrade your GNU compiler to one that supports __declspec. -#endif - -/* - * When building the DLL code, you should define PTW32_BUILD so that - * the variables/functions are exported correctly. When using the DLL, - * do NOT define PTW32_BUILD, and then the variables/functions will - * be imported correctly. - */ -#ifndef PTW32_STATIC_LIB -# ifdef PTW32_BUILD -# define PTW32_DLLPORT __declspec (dllexport) -# else -# define PTW32_DLLPORT __declspec (dllimport) -# endif -#else -# define PTW32_DLLPORT -#endif - -/* - * This is a duplicate of what is in the autoconf config.h, - * which is only used when building the pthread-win32 libraries. - */ - -#ifndef PTW32_CONFIG_H -# if defined(WINCE) -# define NEED_ERRNO -# define NEED_SEM -# endif -# if defined(_UWIN) || defined(__MINGW32__) -# define HAVE_MODE_T -# endif -#endif - -/* - * - */ - -#if PTW32_LEVEL >= PTW32_LEVEL_MAX -#ifdef NEED_ERRNO -#include "need_errno.h" -#else -#include -#endif -#endif /* PTW32_LEVEL >= PTW32_LEVEL_MAX */ - -#define _POSIX_SEMAPHORES - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -#ifndef HAVE_MODE_T -typedef unsigned int mode_t; -#endif - - -typedef struct sem_t_ * sem_t; - -PTW32_DLLPORT int __cdecl sem_init (sem_t * sem, - int pshared, - unsigned int value); - -PTW32_DLLPORT int __cdecl sem_destroy (sem_t * sem); - -PTW32_DLLPORT int __cdecl sem_trywait (sem_t * sem); - -PTW32_DLLPORT int __cdecl sem_wait (sem_t * sem); - -PTW32_DLLPORT int __cdecl sem_timedwait (sem_t * sem, - const struct timespec * abstime); - -PTW32_DLLPORT int __cdecl sem_post (sem_t * sem); - -PTW32_DLLPORT int __cdecl sem_post_multiple (sem_t * sem, - int count); - -PTW32_DLLPORT int __cdecl sem_open (const char * name, - int oflag, - mode_t mode, - unsigned int value); - -PTW32_DLLPORT int __cdecl sem_close (sem_t * sem); - -PTW32_DLLPORT int __cdecl sem_unlink (const char * name); - -PTW32_DLLPORT int __cdecl sem_getvalue (sem_t * sem, - int * sval); - -#ifdef __cplusplus -} /* End of extern "C" */ -#endif /* __cplusplus */ - -#undef PTW32_LEVEL -#undef PTW32_LEVEL_MAX - -#endif /* !SEMAPHORE_H */ diff --git a/cocos2dx/proj.win32/cocos2dx.props b/cocos2dx/proj.win32/cocos2dx.props index 62713bd14d..7dc119b240 100644 --- a/cocos2dx/proj.win32/cocos2dx.props +++ b/cocos2dx/proj.win32/cocos2dx.props @@ -7,7 +7,7 @@ - opengl32.lib;glew32.lib;libzlib.lib;libpng.lib;libjpeg.lib;libtiff.lib;libwebp.lib;libiconv.lib;pthreadVCE2.lib;winmm.lib;%(AdditionalDependencies) + opengl32.lib;glew32.lib;libzlib.lib;libpng.lib;libjpeg.lib;libtiff.lib;libwebp.lib;libiconv.lib;winmm.lib;%(AdditionalDependencies) $(OutDir);%(AdditionalLibraryDirectories) false From bd3106fef24ebc7d5b2a6c1bc25cd7b2ed2171cd Mon Sep 17 00:00:00 2001 From: James Chen Date: Wed, 26 Jun 2013 13:59:09 +0900 Subject: [PATCH 14/15] Update AUTHORS [ci skip] --- AUTHORS | 1 + 1 file changed, 1 insertion(+) diff --git a/AUTHORS b/AUTHORS index bc15b1e4c4..7ebe89b07a 100644 --- a/AUTHORS +++ b/AUTHORS @@ -62,6 +62,7 @@ Developers: Added __attribute__(__format__()) for CCLog and CCString Refactoring network extension and fixing unlikely memory leaks. Adding PUT/DELETE methods for CCHttpRequest. + Adding project part for QtCreator. savdalion Added example for russian language in TestCpp From 456f422c8a7ccdadf5f62bb789577ca294c2481c Mon Sep 17 00:00:00 2001 From: James Chen Date: Wed, 26 Jun 2013 14:44:24 +0900 Subject: [PATCH 15/15] Update AUTHORS [ci skip] --- AUTHORS | 1 + 1 file changed, 1 insertion(+) diff --git a/AUTHORS b/AUTHORS index 7ebe89b07a..d62059fb13 100644 --- a/AUTHORS +++ b/AUTHORS @@ -359,6 +359,7 @@ Developers: Renaming CCScriptSupport::executeAssert to CCScriptSupport::handleAssert. Adding Native Client support for develop branch (cocos2d-x 3.0) and some warnings fixes. Cleanup travis build scripts. + Refactoring emscripten building script. Peter Young (young40) Implements setVisible() for CCEditBox