From f734cc3f7ba18e7e4c27a38d1e859baf28fcbc6e Mon Sep 17 00:00:00 2001 From: CocosRobot Date: Tue, 20 May 2014 11:46:42 +0000 Subject: [PATCH] [AUTO]: updating luabinding automatically --- .../lua-bindings/auto/api/GLProgramCache.lua | 39 + .../lua-bindings/auto/api/GLProgramState.lua | 100 + .../scripting/lua-bindings/auto/api/Mesh.lua | 66 + .../lua-bindings/auto/api/Sprite3D.lua | 5 + .../auto/api/lua_cocos2dx_auto_api.lua | 15 + .../lua-bindings/auto/lua_cocos2dx_auto.cpp | 1626 ++++++++++++++++- .../lua-bindings/auto/lua_cocos2dx_auto.hpp | 38 + 7 files changed, 1887 insertions(+), 2 deletions(-) create mode 100644 cocos/scripting/lua-bindings/auto/api/GLProgramCache.lua create mode 100644 cocos/scripting/lua-bindings/auto/api/GLProgramState.lua create mode 100644 cocos/scripting/lua-bindings/auto/api/Mesh.lua diff --git a/cocos/scripting/lua-bindings/auto/api/GLProgramCache.lua b/cocos/scripting/lua-bindings/auto/api/GLProgramCache.lua new file mode 100644 index 0000000000..1f6f66d157 --- /dev/null +++ b/cocos/scripting/lua-bindings/auto/api/GLProgramCache.lua @@ -0,0 +1,39 @@ + +-------------------------------- +-- @module GLProgramCache +-- @extend Ref + +-------------------------------- +-- @function [parent=#GLProgramCache] addGLProgram +-- @param self +-- @param #cc.GLProgram glprogram +-- @param #string str + +-------------------------------- +-- @function [parent=#GLProgramCache] getGLProgram +-- @param self +-- @param #string str +-- @return GLProgram#GLProgram ret (return value: cc.GLProgram) + +-------------------------------- +-- @function [parent=#GLProgramCache] reloadDefaultGLPrograms +-- @param self + +-------------------------------- +-- @function [parent=#GLProgramCache] loadDefaultGLPrograms +-- @param self + +-------------------------------- +-- @function [parent=#GLProgramCache] destroyInstance +-- @param self + +-------------------------------- +-- @function [parent=#GLProgramCache] getInstance +-- @param self +-- @return GLProgramCache#GLProgramCache ret (return value: cc.GLProgramCache) + +-------------------------------- +-- @function [parent=#GLProgramCache] GLProgramCache +-- @param self + +return nil diff --git a/cocos/scripting/lua-bindings/auto/api/GLProgramState.lua b/cocos/scripting/lua-bindings/auto/api/GLProgramState.lua new file mode 100644 index 0000000000..c47765057e --- /dev/null +++ b/cocos/scripting/lua-bindings/auto/api/GLProgramState.lua @@ -0,0 +1,100 @@ + +-------------------------------- +-- @module GLProgramState +-- @extend Ref + +-------------------------------- +-- overload function: setUniformTexture(string, unsigned int) +-- +-- overload function: setUniformTexture(string, cc.Texture2D) +-- +-- @function [parent=#GLProgramState] setUniformTexture +-- @param self +-- @param #string str +-- @param #cc.Texture2D texture2d + +-------------------------------- +-- @function [parent=#GLProgramState] setUniformMat4 +-- @param self +-- @param #string str +-- @param #cc.Mat4 mat4 + +-------------------------------- +-- @function [parent=#GLProgramState] getUniformCount +-- @param self +-- @return long#long ret (return value: long) + +-------------------------------- +-- @function [parent=#GLProgramState] setUniformFloat +-- @param self +-- @param #string str +-- @param #float float + +-------------------------------- +-- @function [parent=#GLProgramState] setUniformVec3 +-- @param self +-- @param #string str +-- @param #cc.Vec3 vec3 + +-------------------------------- +-- @function [parent=#GLProgramState] setGLProgram +-- @param self +-- @param #cc.GLProgram glprogram + +-------------------------------- +-- @function [parent=#GLProgramState] setUniformVec4 +-- @param self +-- @param #string str +-- @param #cc.Vec4 vec4 + +-------------------------------- +-- @function [parent=#GLProgramState] getVertexAttribCount +-- @param self +-- @return long#long ret (return value: long) + +-------------------------------- +-- @function [parent=#GLProgramState] setUniformInt +-- @param self +-- @param #string str +-- @param #int int + +-------------------------------- +-- @function [parent=#GLProgramState] setUniformVec2 +-- @param self +-- @param #string str +-- @param #cc.Vec2 vec2 + +-------------------------------- +-- @function [parent=#GLProgramState] getVertexAttribsFlags +-- @param self +-- @return unsigned int#unsigned int ret (return value: unsigned int) + +-------------------------------- +-- @function [parent=#GLProgramState] apply +-- @param self +-- @param #cc.Mat4 mat4 + +-------------------------------- +-- @function [parent=#GLProgramState] getGLProgram +-- @param self +-- @return GLProgram#GLProgram ret (return value: cc.GLProgram) + +-------------------------------- +-- @function [parent=#GLProgramState] create +-- @param self +-- @param #cc.GLProgram glprogram +-- @return GLProgramState#GLProgramState ret (return value: cc.GLProgramState) + +-------------------------------- +-- @function [parent=#GLProgramState] getOrCreateWithGLProgramName +-- @param self +-- @param #string str +-- @return GLProgramState#GLProgramState ret (return value: cc.GLProgramState) + +-------------------------------- +-- @function [parent=#GLProgramState] getOrCreateWithGLProgram +-- @param self +-- @param #cc.GLProgram glprogram +-- @return GLProgramState#GLProgramState ret (return value: cc.GLProgramState) + +return nil diff --git a/cocos/scripting/lua-bindings/auto/api/Mesh.lua b/cocos/scripting/lua-bindings/auto/api/Mesh.lua new file mode 100644 index 0000000000..5d2de87cff --- /dev/null +++ b/cocos/scripting/lua-bindings/auto/api/Mesh.lua @@ -0,0 +1,66 @@ + +-------------------------------- +-- @module Mesh +-- @extend Ref + +-------------------------------- +-- @function [parent=#Mesh] restore +-- @param self + +-------------------------------- +-- @function [parent=#Mesh] getMeshVertexAttribCount +-- @param self +-- @return long#long ret (return value: long) + +-------------------------------- +-- @function [parent=#Mesh] getIndexFormat +-- @param self +-- @return Mesh::IndexFormat#Mesh::IndexFormat ret (return value: cc.Mesh::IndexFormat) + +-------------------------------- +-- @function [parent=#Mesh] getVertexSizeInBytes +-- @param self +-- @return int#int ret (return value: int) + +-------------------------------- +-- @function [parent=#Mesh] getPrimitiveType +-- @param self +-- @return Mesh::PrimitiveType#Mesh::PrimitiveType ret (return value: cc.Mesh::PrimitiveType) + +-------------------------------- +-- @function [parent=#Mesh] getIndexCount +-- @param self +-- @return long#long ret (return value: long) + +-------------------------------- +-- @function [parent=#Mesh] getVertexBuffer +-- @param self +-- @return unsigned int#unsigned int ret (return value: unsigned int) + +-------------------------------- +-- @function [parent=#Mesh] getMeshVertexAttribute +-- @param self +-- @param #int int +-- @return MeshVertexAttrib#MeshVertexAttrib ret (return value: cc.MeshVertexAttrib) + +-------------------------------- +-- @function [parent=#Mesh] getIndexBuffer +-- @param self +-- @return unsigned int#unsigned int ret (return value: unsigned int) + +-------------------------------- +-- @function [parent=#Mesh] hasVertexAttrib +-- @param self +-- @param #int int +-- @return bool#bool ret (return value: bool) + +-------------------------------- +-- @function [parent=#Mesh] create +-- @param self +-- @param #array_table array +-- @param #array_table array +-- @param #array_table array +-- @param #array_table vector > +-- @return Mesh#Mesh ret (return value: cc.Mesh) + +return nil diff --git a/cocos/scripting/lua-bindings/auto/api/Sprite3D.lua b/cocos/scripting/lua-bindings/auto/api/Sprite3D.lua index 264531e866..5031415719 100644 --- a/cocos/scripting/lua-bindings/auto/api/Sprite3D.lua +++ b/cocos/scripting/lua-bindings/auto/api/Sprite3D.lua @@ -12,6 +12,11 @@ -- @param self -- @param #string str +-------------------------------- +-- @function [parent=#Sprite3D] getMesh +-- @param self +-- @return Mesh#Mesh ret (return value: cc.Mesh) + -------------------------------- -- @function [parent=#Sprite3D] getBlendFunc -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_auto_api.lua b/cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_auto_api.lua index 4a2120d628..002779db85 100644 --- a/cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_auto_api.lua +++ b/cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_auto_api.lua @@ -51,6 +51,11 @@ -- @field [parent=#cc] Node#Node Node preloaded module +-------------------------------------------------------- +-- the cc GLProgramState +-- @field [parent=#cc] GLProgramState#GLProgramState GLProgramState preloaded module + + -------------------------------------------------------- -- the cc AtlasNode -- @field [parent=#cc] AtlasNode#AtlasNode AtlasNode preloaded module @@ -1126,6 +1131,11 @@ -- @field [parent=#cc] TiledGrid3D#TiledGrid3D TiledGrid3D preloaded module +-------------------------------------------------------- +-- the cc GLProgramCache +-- @field [parent=#cc] GLProgramCache#GLProgramCache GLProgramCache preloaded module + + -------------------------------------------------------- -- the cc TextureCache -- @field [parent=#cc] TextureCache#TextureCache TextureCache preloaded module @@ -1206,6 +1216,11 @@ -- @field [parent=#cc] Sprite3D#Sprite3D Sprite3D preloaded module +-------------------------------------------------------- +-- the cc Mesh +-- @field [parent=#cc] Mesh#Mesh Mesh preloaded module + + -------------------------------------------------------- -- the cc SimpleAudioEngine -- @field [parent=#cc] SimpleAudioEngine#SimpleAudioEngine SimpleAudioEngine preloaded module diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp index e1486c569e..4558f77700 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp @@ -9382,6 +9382,763 @@ int lua_register_cocos2dx_Node(lua_State* tolua_S) return 1; } +int lua_cocos2dx_GLProgramState_setUniformTexture(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgramState* cobj = nullptr; + bool ok = true; +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.GLProgramState",0,&tolua_err)) goto tolua_lerror; +#endif + cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_setUniformTexture'", nullptr); + return 0; + } +#endif + argc = lua_gettop(tolua_S)-1; + do{ + if (argc == 2) { + std::string arg0; + ok &= luaval_to_std_string(tolua_S, 2,&arg0); + + if (!ok) { break; } + unsigned int arg1; + ok &= luaval_to_uint32(tolua_S, 3,&arg1); + + if (!ok) { break; } + cobj->setUniformTexture(arg0, arg1); + return 0; + } + }while(0); + ok = true; + do{ + if (argc == 2) { + std::string arg0; + ok &= luaval_to_std_string(tolua_S, 2,&arg0); + + if (!ok) { break; } + cocos2d::Texture2D* arg1; + ok &= luaval_to_object(tolua_S, 3, "cc.Texture2D",&arg1); + + if (!ok) { break; } + cobj->setUniformTexture(arg0, arg1); + return 0; + } + }while(0); + ok = true; + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "setUniformTexture",argc, 2); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_setUniformTexture'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLProgramState_setUniformMat4(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgramState* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.GLProgramState",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_setUniformMat4'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 2) + { + std::string arg0; + cocos2d::Mat4 arg1; + + ok &= luaval_to_std_string(tolua_S, 2,&arg0); + + ok &= luaval_to_mat4(tolua_S, 3, &arg1); + if(!ok) + return 0; + cobj->setUniformMat4(arg0, arg1); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "setUniformMat4",argc, 2); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_setUniformMat4'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLProgramState_getUniformCount(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgramState* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.GLProgramState",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_getUniformCount'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + ssize_t ret = cobj->getUniformCount(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "getUniformCount",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_getUniformCount'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLProgramState_setUniformFloat(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgramState* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.GLProgramState",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_setUniformFloat'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 2) + { + std::string arg0; + double arg1; + + ok &= luaval_to_std_string(tolua_S, 2,&arg0); + + ok &= luaval_to_number(tolua_S, 3,&arg1); + if(!ok) + return 0; + cobj->setUniformFloat(arg0, arg1); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "setUniformFloat",argc, 2); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_setUniformFloat'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLProgramState_setUniformVec3(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgramState* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.GLProgramState",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_setUniformVec3'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 2) + { + std::string arg0; + cocos2d::Vec3 arg1; + + ok &= luaval_to_std_string(tolua_S, 2,&arg0); + + ok &= luaval_to_vec3(tolua_S, 3, &arg1); + if(!ok) + return 0; + cobj->setUniformVec3(arg0, arg1); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "setUniformVec3",argc, 2); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_setUniformVec3'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLProgramState_setGLProgram(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgramState* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.GLProgramState",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_setGLProgram'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::GLProgram* arg0; + + ok &= luaval_to_object(tolua_S, 2, "cc.GLProgram",&arg0); + if(!ok) + return 0; + cobj->setGLProgram(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "setGLProgram",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_setGLProgram'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLProgramState_setUniformVec4(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgramState* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.GLProgramState",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_setUniformVec4'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 2) + { + std::string arg0; + cocos2d::Vec4 arg1; + + ok &= luaval_to_std_string(tolua_S, 2,&arg0); + + ok &= luaval_to_vec4(tolua_S, 3, &arg1); + if(!ok) + return 0; + cobj->setUniformVec4(arg0, arg1); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "setUniformVec4",argc, 2); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_setUniformVec4'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLProgramState_getVertexAttribCount(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgramState* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.GLProgramState",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_getVertexAttribCount'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + ssize_t ret = cobj->getVertexAttribCount(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "getVertexAttribCount",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_getVertexAttribCount'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLProgramState_setUniformInt(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgramState* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.GLProgramState",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_setUniformInt'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 2) + { + std::string arg0; + int arg1; + + ok &= luaval_to_std_string(tolua_S, 2,&arg0); + + ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1); + if(!ok) + return 0; + cobj->setUniformInt(arg0, arg1); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "setUniformInt",argc, 2); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_setUniformInt'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLProgramState_setUniformVec2(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgramState* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.GLProgramState",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_setUniformVec2'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 2) + { + std::string arg0; + cocos2d::Vec2 arg1; + + ok &= luaval_to_std_string(tolua_S, 2,&arg0); + + ok &= luaval_to_vec2(tolua_S, 3, &arg1); + if(!ok) + return 0; + cobj->setUniformVec2(arg0, arg1); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "setUniformVec2",argc, 2); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_setUniformVec2'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLProgramState_getVertexAttribsFlags(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgramState* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.GLProgramState",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_getVertexAttribsFlags'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + unsigned int ret = cobj->getVertexAttribsFlags(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "getVertexAttribsFlags",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_getVertexAttribsFlags'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLProgramState_apply(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgramState* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.GLProgramState",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_apply'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Mat4 arg0; + + ok &= luaval_to_mat4(tolua_S, 2, &arg0); + if(!ok) + return 0; + cobj->apply(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "apply",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_apply'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLProgramState_getGLProgram(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgramState* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.GLProgramState",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_getGLProgram'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cocos2d::GLProgram* ret = cobj->getGLProgram(); + object_to_luaval(tolua_S, "cc.GLProgram",(cocos2d::GLProgram*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "getGLProgram",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_getGLProgram'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLProgramState_create(lua_State* tolua_S) +{ + int argc = 0; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertable(tolua_S,1,"cc.GLProgramState",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 1) + { + cocos2d::GLProgram* arg0; + ok &= luaval_to_object(tolua_S, 2, "cc.GLProgram",&arg0); + if(!ok) + return 0; + cocos2d::GLProgramState* ret = cocos2d::GLProgramState::create(arg0); + object_to_luaval(tolua_S, "cc.GLProgramState",(cocos2d::GLProgramState*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "create",argc, 1); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_create'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_GLProgramState_getOrCreateWithGLProgramName(lua_State* tolua_S) +{ + int argc = 0; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertable(tolua_S,1,"cc.GLProgramState",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 1) + { + std::string arg0; + ok &= luaval_to_std_string(tolua_S, 2,&arg0); + if(!ok) + return 0; + cocos2d::GLProgramState* ret = cocos2d::GLProgramState::getOrCreateWithGLProgramName(arg0); + object_to_luaval(tolua_S, "cc.GLProgramState",(cocos2d::GLProgramState*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "getOrCreateWithGLProgramName",argc, 1); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_getOrCreateWithGLProgramName'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_GLProgramState_getOrCreateWithGLProgram(lua_State* tolua_S) +{ + int argc = 0; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertable(tolua_S,1,"cc.GLProgramState",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 1) + { + cocos2d::GLProgram* arg0; + ok &= luaval_to_object(tolua_S, 2, "cc.GLProgram",&arg0); + if(!ok) + return 0; + cocos2d::GLProgramState* ret = cocos2d::GLProgramState::getOrCreateWithGLProgram(arg0); + object_to_luaval(tolua_S, "cc.GLProgramState",(cocos2d::GLProgramState*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "getOrCreateWithGLProgram",argc, 1); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_getOrCreateWithGLProgram'.",&tolua_err); +#endif + return 0; +} +static int lua_cocos2dx_GLProgramState_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (GLProgramState)"); + return 0; +} + +int lua_register_cocos2dx_GLProgramState(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.GLProgramState"); + tolua_cclass(tolua_S,"GLProgramState","cc.GLProgramState","cc.Ref",nullptr); + + tolua_beginmodule(tolua_S,"GLProgramState"); + tolua_function(tolua_S,"setUniformTexture",lua_cocos2dx_GLProgramState_setUniformTexture); + tolua_function(tolua_S,"setUniformMat4",lua_cocos2dx_GLProgramState_setUniformMat4); + tolua_function(tolua_S,"getUniformCount",lua_cocos2dx_GLProgramState_getUniformCount); + tolua_function(tolua_S,"setUniformFloat",lua_cocos2dx_GLProgramState_setUniformFloat); + tolua_function(tolua_S,"setUniformVec3",lua_cocos2dx_GLProgramState_setUniformVec3); + tolua_function(tolua_S,"setGLProgram",lua_cocos2dx_GLProgramState_setGLProgram); + tolua_function(tolua_S,"setUniformVec4",lua_cocos2dx_GLProgramState_setUniformVec4); + tolua_function(tolua_S,"getVertexAttribCount",lua_cocos2dx_GLProgramState_getVertexAttribCount); + tolua_function(tolua_S,"setUniformInt",lua_cocos2dx_GLProgramState_setUniformInt); + tolua_function(tolua_S,"setUniformVec2",lua_cocos2dx_GLProgramState_setUniformVec2); + tolua_function(tolua_S,"getVertexAttribsFlags",lua_cocos2dx_GLProgramState_getVertexAttribsFlags); + tolua_function(tolua_S,"apply",lua_cocos2dx_GLProgramState_apply); + tolua_function(tolua_S,"getGLProgram",lua_cocos2dx_GLProgramState_getGLProgram); + tolua_function(tolua_S,"create", lua_cocos2dx_GLProgramState_create); + tolua_function(tolua_S,"getOrCreateWithGLProgramName", lua_cocos2dx_GLProgramState_getOrCreateWithGLProgramName); + tolua_function(tolua_S,"getOrCreateWithGLProgram", lua_cocos2dx_GLProgramState_getOrCreateWithGLProgram); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::GLProgramState).name(); + g_luaType[typeName] = "cc.GLProgramState"; + g_typeCast["GLProgramState"] = "cc.GLProgramState"; + return 1; +} + int lua_cocos2dx_AtlasNode_updateAtlasValues(lua_State* tolua_S) { int argc = 0; @@ -55413,6 +56170,309 @@ int lua_register_cocos2dx_TiledGrid3D(lua_State* tolua_S) return 1; } +int lua_cocos2dx_GLProgramCache_addGLProgram(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgramCache* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.GLProgramCache",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLProgramCache*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramCache_addGLProgram'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 2) + { + cocos2d::GLProgram* arg0; + std::string arg1; + + ok &= luaval_to_object(tolua_S, 2, "cc.GLProgram",&arg0); + + ok &= luaval_to_std_string(tolua_S, 3,&arg1); + if(!ok) + return 0; + cobj->addGLProgram(arg0, arg1); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "addGLProgram",argc, 2); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramCache_addGLProgram'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLProgramCache_getGLProgram(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgramCache* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.GLProgramCache",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLProgramCache*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramCache_getGLProgram'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + std::string arg0; + + ok &= luaval_to_std_string(tolua_S, 2,&arg0); + if(!ok) + return 0; + cocos2d::GLProgram* ret = cobj->getGLProgram(arg0); + object_to_luaval(tolua_S, "cc.GLProgram",(cocos2d::GLProgram*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "getGLProgram",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramCache_getGLProgram'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLProgramCache_reloadDefaultGLPrograms(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgramCache* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.GLProgramCache",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLProgramCache*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramCache_reloadDefaultGLPrograms'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cobj->reloadDefaultGLPrograms(); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "reloadDefaultGLPrograms",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramCache_reloadDefaultGLPrograms'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLProgramCache_loadDefaultGLPrograms(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgramCache* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.GLProgramCache",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLProgramCache*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramCache_loadDefaultGLPrograms'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cobj->loadDefaultGLPrograms(); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "loadDefaultGLPrograms",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramCache_loadDefaultGLPrograms'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLProgramCache_destroyInstance(lua_State* tolua_S) +{ + int argc = 0; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertable(tolua_S,1,"cc.GLProgramCache",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 0) + { + if(!ok) + return 0; + cocos2d::GLProgramCache::destroyInstance(); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "destroyInstance",argc, 0); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramCache_destroyInstance'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_GLProgramCache_getInstance(lua_State* tolua_S) +{ + int argc = 0; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertable(tolua_S,1,"cc.GLProgramCache",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 0) + { + if(!ok) + return 0; + cocos2d::GLProgramCache* ret = cocos2d::GLProgramCache::getInstance(); + object_to_luaval(tolua_S, "cc.GLProgramCache",(cocos2d::GLProgramCache*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "getInstance",argc, 0); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramCache_getInstance'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_GLProgramCache_constructor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgramCache* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cobj = new cocos2d::GLProgramCache(); + cobj->autorelease(); + int ID = (int)cobj->_ID ; + int* luaID = &cobj->_luaID ; + toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.GLProgramCache"); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "GLProgramCache",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramCache_constructor'.",&tolua_err); +#endif + + return 0; +} + +static int lua_cocos2dx_GLProgramCache_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (GLProgramCache)"); + return 0; +} + +int lua_register_cocos2dx_GLProgramCache(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.GLProgramCache"); + tolua_cclass(tolua_S,"GLProgramCache","cc.GLProgramCache","cc.Ref",nullptr); + + tolua_beginmodule(tolua_S,"GLProgramCache"); + tolua_function(tolua_S,"addGLProgram",lua_cocos2dx_GLProgramCache_addGLProgram); + tolua_function(tolua_S,"getGLProgram",lua_cocos2dx_GLProgramCache_getGLProgram); + tolua_function(tolua_S,"reloadDefaultGLPrograms",lua_cocos2dx_GLProgramCache_reloadDefaultGLPrograms); + tolua_function(tolua_S,"loadDefaultGLPrograms",lua_cocos2dx_GLProgramCache_loadDefaultGLPrograms); + tolua_function(tolua_S,"new",lua_cocos2dx_GLProgramCache_constructor); + tolua_function(tolua_S,"destroyInstance", lua_cocos2dx_GLProgramCache_destroyInstance); + tolua_function(tolua_S,"getInstance", lua_cocos2dx_GLProgramCache_getInstance); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::GLProgramCache).name(); + g_luaType[typeName] = "cc.GLProgramCache"; + g_typeCast["GLProgramCache"] = "cc.GLProgramCache"; + return 1; +} + int lua_cocos2dx_TextureCache_reloadTexture(lua_State* tolua_S) { int argc = 0; @@ -63540,6 +64600,50 @@ int lua_cocos2dx_Sprite3D_setTexture(lua_State* tolua_S) return 0; } +int lua_cocos2dx_Sprite3D_getMesh(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Sprite3D* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Sprite3D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Sprite3D_getMesh'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cocos2d::Mesh* ret = cobj->getMesh(); + object_to_luaval(tolua_S, "cc.Mesh",(cocos2d::Mesh*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "getMesh",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Sprite3D_getMesh'.",&tolua_err); +#endif + + return 0; +} int lua_cocos2dx_Sprite3D_getBlendFunc(lua_State* tolua_S) { int argc = 0; @@ -63694,6 +64798,7 @@ int lua_register_cocos2dx_Sprite3D(lua_State* tolua_S) tolua_beginmodule(tolua_S,"Sprite3D"); tolua_function(tolua_S,"setTexture",lua_cocos2dx_Sprite3D_setTexture); + tolua_function(tolua_S,"getMesh",lua_cocos2dx_Sprite3D_getMesh); tolua_function(tolua_S,"getBlendFunc",lua_cocos2dx_Sprite3D_getBlendFunc); tolua_function(tolua_S,"setBlendFunc",lua_cocos2dx_Sprite3D_setBlendFunc); tolua_function(tolua_S,"create", lua_cocos2dx_Sprite3D_create); @@ -63704,6 +64809,520 @@ int lua_register_cocos2dx_Sprite3D(lua_State* tolua_S) return 1; } +int lua_cocos2dx_Mesh_restore(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Mesh* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Mesh",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Mesh*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Mesh_restore'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cobj->restore(); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "restore",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Mesh_restore'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Mesh_getMeshVertexAttribCount(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Mesh* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Mesh",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Mesh*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Mesh_getMeshVertexAttribCount'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + ssize_t ret = cobj->getMeshVertexAttribCount(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "getMeshVertexAttribCount",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Mesh_getMeshVertexAttribCount'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Mesh_getIndexFormat(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Mesh* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Mesh",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Mesh*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Mesh_getIndexFormat'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + int ret = (int)cobj->getIndexFormat(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "getIndexFormat",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Mesh_getIndexFormat'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Mesh_getVertexSizeInBytes(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Mesh* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Mesh",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Mesh*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Mesh_getVertexSizeInBytes'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + int ret = cobj->getVertexSizeInBytes(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "getVertexSizeInBytes",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Mesh_getVertexSizeInBytes'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Mesh_getPrimitiveType(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Mesh* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Mesh",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Mesh*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Mesh_getPrimitiveType'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + int ret = (int)cobj->getPrimitiveType(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "getPrimitiveType",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Mesh_getPrimitiveType'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Mesh_getIndexCount(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Mesh* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Mesh",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Mesh*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Mesh_getIndexCount'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + ssize_t ret = cobj->getIndexCount(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "getIndexCount",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Mesh_getIndexCount'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Mesh_getVertexBuffer(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Mesh* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Mesh",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Mesh*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Mesh_getVertexBuffer'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + unsigned int ret = cobj->getVertexBuffer(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "getVertexBuffer",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Mesh_getVertexBuffer'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Mesh_getMeshVertexAttribute(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Mesh* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Mesh",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Mesh*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Mesh_getMeshVertexAttribute'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + int arg0; + + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0); + if(!ok) + return 0; + const cocos2d::MeshVertexAttrib& ret = cobj->getMeshVertexAttribute(arg0); + mesh_vertex_attrib_to_luaval(tolua_S, ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "getMeshVertexAttribute",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Mesh_getMeshVertexAttribute'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Mesh_getIndexBuffer(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Mesh* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Mesh",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Mesh*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Mesh_getIndexBuffer'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + unsigned int ret = cobj->getIndexBuffer(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "getIndexBuffer",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Mesh_getIndexBuffer'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Mesh_hasVertexAttrib(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Mesh* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Mesh",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Mesh*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Mesh_hasVertexAttrib'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + int arg0; + + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0); + if(!ok) + return 0; + bool ret = cobj->hasVertexAttrib(arg0); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "hasVertexAttrib",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Mesh_hasVertexAttrib'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Mesh_create(lua_State* tolua_S) +{ + int argc = 0; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertable(tolua_S,1,"cc.Mesh",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 4) + { + std::vector > arg0; + std::vector > arg1; + std::vector > arg2; + std::vector > arg3; + ok &= luaval_to_std_vector_float(tolua_S, 2, &arg0); + ok &= luaval_to_std_vector_float(tolua_S, 3, &arg1); + ok &= luaval_to_std_vector_float(tolua_S, 4, &arg2); + ok &= luaval_to_std_vector_ushort(tolua_S, 5, &arg3); + if(!ok) + return 0; + cocos2d::Mesh* ret = cocos2d::Mesh::create(arg0, arg1, arg2, arg3); + object_to_luaval(tolua_S, "cc.Mesh",(cocos2d::Mesh*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "create",argc, 4); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Mesh_create'.",&tolua_err); +#endif + return 0; +} +static int lua_cocos2dx_Mesh_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (Mesh)"); + return 0; +} + +int lua_register_cocos2dx_Mesh(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.Mesh"); + tolua_cclass(tolua_S,"Mesh","cc.Mesh","cc.Ref",nullptr); + + tolua_beginmodule(tolua_S,"Mesh"); + tolua_function(tolua_S,"restore",lua_cocos2dx_Mesh_restore); + tolua_function(tolua_S,"getMeshVertexAttribCount",lua_cocos2dx_Mesh_getMeshVertexAttribCount); + tolua_function(tolua_S,"getIndexFormat",lua_cocos2dx_Mesh_getIndexFormat); + tolua_function(tolua_S,"getVertexSizeInBytes",lua_cocos2dx_Mesh_getVertexSizeInBytes); + tolua_function(tolua_S,"getPrimitiveType",lua_cocos2dx_Mesh_getPrimitiveType); + tolua_function(tolua_S,"getIndexCount",lua_cocos2dx_Mesh_getIndexCount); + tolua_function(tolua_S,"getVertexBuffer",lua_cocos2dx_Mesh_getVertexBuffer); + tolua_function(tolua_S,"getMeshVertexAttribute",lua_cocos2dx_Mesh_getMeshVertexAttribute); + tolua_function(tolua_S,"getIndexBuffer",lua_cocos2dx_Mesh_getIndexBuffer); + tolua_function(tolua_S,"hasVertexAttrib",lua_cocos2dx_Mesh_hasVertexAttrib); + tolua_function(tolua_S,"create", lua_cocos2dx_Mesh_create); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::Mesh).name(); + g_luaType[typeName] = "cc.Mesh"; + g_typeCast["Mesh"] = "cc.Mesh"; + return 1; +} + int lua_cocos2dx_SimpleAudioEngine_preloadBackgroundMusic(lua_State* tolua_S) { int argc = 0; @@ -65434,6 +67053,7 @@ TOLUA_API int register_all_cocos2dx(lua_State* tolua_S) lua_register_cocos2dx_Grid3DAction(tolua_S); lua_register_cocos2dx_FadeTo(tolua_S); lua_register_cocos2dx_FadeIn(tolua_S); + lua_register_cocos2dx_ShakyTiles3D(tolua_S); lua_register_cocos2dx_EventListenerCustom(tolua_S); lua_register_cocos2dx_FlipX3D(tolua_S); lua_register_cocos2dx_FlipY3D(tolua_S); @@ -65530,6 +67150,7 @@ TOLUA_API int register_all_cocos2dx(lua_State* tolua_S) lua_register_cocos2dx_TransitionFadeBL(tolua_S); lua_register_cocos2dx_TargetedAction(tolua_S); lua_register_cocos2dx_DrawNode(tolua_S); + lua_register_cocos2dx_Mesh(tolua_S); lua_register_cocos2dx_TransitionTurnOffTiles(tolua_S); lua_register_cocos2dx_RotateTo(tolua_S); lua_register_cocos2dx_TransitionSplitRows(tolua_S); @@ -65552,7 +67173,7 @@ TOLUA_API int register_all_cocos2dx(lua_State* tolua_S) lua_register_cocos2dx_ScaleTo(tolua_S); lua_register_cocos2dx_Spawn(tolua_S); lua_register_cocos2dx_EaseQuarticActionInOut(tolua_S); - lua_register_cocos2dx_ShakyTiles3D(tolua_S); + lua_register_cocos2dx_GLProgramState(tolua_S); lua_register_cocos2dx_PageTurn3D(tolua_S); lua_register_cocos2dx_TransitionSlideInL(tolua_S); lua_register_cocos2dx_TransitionSlideInT(tolua_S); @@ -65582,6 +67203,7 @@ TOLUA_API int register_all_cocos2dx(lua_State* tolua_S) lua_register_cocos2dx_MenuItemAtlasFont(tolua_S); lua_register_cocos2dx_Liquid(tolua_S); lua_register_cocos2dx_OrbitCamera(tolua_S); + lua_register_cocos2dx_ParallaxNode(tolua_S); lua_register_cocos2dx_EventCustom(tolua_S); lua_register_cocos2dx_ParticleBatchNode(tolua_S); lua_register_cocos2dx_Component(tolua_S); @@ -65610,7 +67232,7 @@ TOLUA_API int register_all_cocos2dx(lua_State* tolua_S) lua_register_cocos2dx_TransitionProgressRadialCW(tolua_S); lua_register_cocos2dx_EaseBounceInOut(tolua_S); lua_register_cocos2dx_TransitionSlideInR(tolua_S); - lua_register_cocos2dx_ParallaxNode(tolua_S); + lua_register_cocos2dx_GLProgramCache(tolua_S); lua_register_cocos2dx_EaseQuadraticActionIn(tolua_S); lua_register_cocos2dx_WavesTiles3D(tolua_S); lua_register_cocos2dx_TransitionSlideInB(tolua_S); diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.hpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.hpp index 62a4c37607..5899bee1f4 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.hpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.hpp @@ -1548,6 +1548,44 @@ int register_all_cocos2dx(lua_State* tolua_S); + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +