Merge pull request #11710 from CocosRobot/update_lua_bindings_1430874149

[AUTO]: updating luabinding & jsbinding automatically
This commit is contained in:
minggo 2015-05-06 09:39:53 +08:00
commit d863eb404d
15 changed files with 2979 additions and 1460 deletions

View File

@ -476,6 +476,18 @@ removeAllAttachNode : function (
{
},
/**
* @method setMaterial
* @param {cc.Material|cc.Material} material
* @param {int} int
*/
setMaterial : function(
material,
int
)
{
},
/**
* @method genGLProgramState
*/
@ -815,6 +827,16 @@ getSkin : function (
return cc.MeshSkin;
},
/**
* @method getMaterial
* @return {cc.Material}
*/
getMaterial : function (
)
{
return cc.Material;
},
/**
* @method getVertexSizeInBytes
* @return {int}
@ -825,6 +847,16 @@ getVertexSizeInBytes : function (
return 0;
},
/**
* @method setMaterial
* @param {cc.Material} arg0
*/
setMaterial : function (
material
)
{
},
/**
* @method getName
* @return {String}
@ -885,6 +917,28 @@ int
return false;
},
/**
* @method draw
* @param {cc.Renderer} arg0
* @param {float} arg1
* @param {mat4_object} arg2
* @param {unsigned int} arg3
* @param {unsigned int} arg4
* @param {vec4_object} arg5
* @param {bool} arg6
*/
draw : function (
renderer,
float,
mat4,
int,
int,
vec4,
bool
)
{
},
/**
* @method getBlendFunc
* @return {cc.BlendFunc}
@ -915,16 +969,6 @@ str
{
},
/**
* @method isVisible
* @return {bool}
*/
isVisible : function (
)
{
return false;
},
/**
* @method getIndexCount
* @return {long}
@ -935,14 +979,6 @@ getIndexCount : function (
return 0;
},
/**
* @method bindMeshCommand
*/
bindMeshCommand : function (
)
{
},
/**
* @method setMeshIndexData
* @param {cc.MeshIndexData} arg0
@ -993,6 +1029,16 @@ meshskin
{
},
/**
* @method isVisible
* @return {bool}
*/
isVisible : function (
)
{
return false;
},
/**
* @method getIndexBuffer
* @return {unsigned int}

View File

@ -1238,6 +1238,16 @@ touch
return cc.Vec2;
},
/**
* @method getMaterial
* @return {cc.Material}
*/
getMaterial : function (
)
{
return cc.Material;
},
/**
* @method removeAllChildrenWithCleanup
* @param {bool} bool
@ -1288,6 +1298,16 @@ isCascadeOpacityEnabled : function (
return false;
},
/**
* @method setMaterial
* @param {cc.Material} arg0
*/
setMaterial : function (
material
)
{
},
/**
* @method setParent
* @param {cc.Node} arg0
@ -10165,38 +10185,6 @@ ProtectedNode : function (
*/
cc.GLProgramState = {
/**
* @method setUniformTexture
* @param {String|String|int|int} str
* @param {unsigned int|cc.Texture2D|cc.Texture2D|unsigned int} int
*/
setUniformTexture : function(
int,
int
)
{
},
/**
* @method setUniformMat4
* @param {int|String} int
* @param {mat4_object|mat4_object} mat4
*/
setUniformMat4 : function(
str,
mat4
)
{
},
/**
* @method applyUniforms
*/
applyUniforms : function (
)
{
},
/**
* @method setUniformCallback
* @param {int|String} int
@ -10210,89 +10198,15 @@ func
},
/**
* @method applyGLProgram
* @param {mat4_object} arg0
* @method getVertexAttribsFlags
* @return {unsigned int}
*/
applyGLProgram : function (
mat4
)
{
},
/**
* @method getUniformCount
* @return {long}
*/
getUniformCount : function (
getVertexAttribsFlags : function (
)
{
return 0;
},
/**
* @method applyAttributes
*/
applyAttributes : function (
)
{
},
/**
* @method setUniformFloat
* @param {int|String} int
* @param {float|float} float
*/
setUniformFloat : function(
str,
float
)
{
},
/**
* @method setUniformVec3
* @param {int|String} int
* @param {vec3_object|vec3_object} vec3
*/
setUniformVec3 : function(
str,
vec3
)
{
},
/**
* @method setUniformInt
* @param {int|String} int
* @param {int|int} int
*/
setUniformInt : function(
str,
int
)
{
},
/**
* @method getVertexAttribCount
* @return {long}
*/
getVertexAttribCount : function (
)
{
return 0;
},
/**
* @method setGLProgram
* @param {cc.GLProgram} arg0
*/
setGLProgram : function (
glprogram
)
{
},
/**
* @method setUniformVec2
* @param {int|String} int
@ -10306,13 +10220,15 @@ vec2
},
/**
* @method getVertexAttribsFlags
* @return {unsigned int}
*/
getVertexAttribsFlags : function (
* @method setUniformVec3
* @param {int|String} int
* @param {vec3_object|vec3_object} vec3
*/
setUniformVec3 : function(
str,
vec3
)
{
return 0;
},
/**
@ -10337,6 +10253,94 @@ mat4
{
},
/**
* @method applyGLProgram
* @param {mat4_object} arg0
*/
applyGLProgram : function (
mat4
)
{
},
/**
* @method setUniformInt
* @param {int|String} int
* @param {int|int} int
*/
setUniformInt : function(
str,
int
)
{
},
/**
* @method setUniformVec2v
* @param {int|String} int
* @param {vec2_object|vec2_object} vec2
* @param {long|long} long
*/
setUniformVec2v : function(
str,
vec2,
long
)
{
},
/**
* @method getUniformCount
* @return {long}
*/
getUniformCount : function (
)
{
return 0;
},
/**
* @method applyAttributes
*/
applyAttributes : function (
)
{
},
/**
* @method clone
* @return {cc.GLProgramState}
*/
clone : function (
)
{
return cc.GLProgramState;
},
/**
* @method setGLProgram
* @param {cc.GLProgram} arg0
*/
setGLProgram : function (
glprogram
)
{
},
/**
* @method setUniformFloatv
* @param {int|String} int
* @param {float|float} float
* @param {long|long} long
*/
setUniformFloatv : function(
str,
float,
long
)
{
},
/**
* @method getGLProgram
* @return {cc.GLProgram}
@ -10347,6 +10351,74 @@ getGLProgram : function (
return cc.GLProgram;
},
/**
* @method setUniformTexture
* @param {String|String|int|int} str
* @param {unsigned int|cc.Texture2D|cc.Texture2D|unsigned int} int
*/
setUniformTexture : function(
int,
int
)
{
},
/**
* @method applyUniforms
*/
applyUniforms : function (
)
{
},
/**
* @method setUniformFloat
* @param {int|String} int
* @param {float|float} float
*/
setUniformFloat : function(
str,
float
)
{
},
/**
* @method setUniformMat4
* @param {int|String} int
* @param {mat4_object|mat4_object} mat4
*/
setUniformMat4 : function(
str,
mat4
)
{
},
/**
* @method setUniformVec3v
* @param {int|String} int
* @param {vec3_object|vec3_object} vec3
* @param {long|long} long
*/
setUniformVec3v : function(
str,
vec3,
long
)
{
},
/**
* @method getVertexAttribCount
* @return {long}
*/
getVertexAttribCount : function (
)
{
return 0;
},
/**
* @method create
* @param {cc.GLProgram} arg0
@ -10383,6 +10455,22 @@ glprogram
return cc.GLProgramState;
},
/**
* @method getOrCreateWithShaders
* @param {String} arg0
* @param {String} arg1
* @param {String} arg2
* @return {cc.GLProgramState}
*/
getOrCreateWithShaders : function (
str,
str,
str
)
{
return cc.GLProgramState;
},
};
/**
@ -18915,13 +19003,15 @@ str
/**
* @method initWithByteArrays
* @param {char} arg0
* @param {char} arg1
* @return {bool}
*/
initWithByteArrays : function (
char,
char
* @param {char|char} char
* @param {char|char} char
* @param {String} str
* @return {bool|bool}
*/
initWithByteArrays : function(
char,
char,
str
)
{
return false;
@ -18941,12 +19031,14 @@ float
/**
* @method initWithFilenames
* @param {String} arg0
* @param {String} arg1
* @return {bool}
*/
initWithFilenames : function (
str,
* @param {String|String} str
* @param {String|String} str
* @param {String} str
* @return {bool|bool}
*/
initWithFilenames : function(
str,
str,
str
)
{
@ -19135,13 +19227,15 @@ int
/**
* @method createWithByteArrays
* @param {char} arg0
* @param {char} arg1
* @return {cc.GLProgram}
*/
createWithByteArrays : function (
char,
char
* @param {char|char} char
* @param {char|char} char
* @param {String} str
* @return {cc.GLProgram|cc.GLProgram}
*/
createWithByteArrays : function(
char,
char,
str
)
{
return cc.GLProgram;
@ -19149,12 +19243,14 @@ char
/**
* @method createWithFilenames
* @param {String} arg0
* @param {String} arg1
* @return {cc.GLProgram}
*/
createWithFilenames : function (
str,
* @param {String|String} str
* @param {String|String} str
* @param {String} str
* @return {cc.GLProgram|cc.GLProgram}
*/
createWithFilenames : function(
str,
str,
str
)
{

View File

@ -1322,6 +1322,59 @@ bool js_cocos2dx_3d_Sprite3D_removeAllAttachNode(JSContext *cx, uint32_t argc, j
JS_ReportError(cx, "js_cocos2dx_3d_Sprite3D_removeAllAttachNode : wrong number of arguments: %d, was expecting %d", argc, 0);
return false;
}
bool js_cocos2dx_3d_Sprite3D_setMaterial(JSContext *cx, uint32_t argc, jsval *vp)
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
bool ok = true;
JS::RootedObject obj(cx);
cocos2d::Sprite3D* cobj = NULL;
obj = args.thisv().toObjectOrNull();
js_proxy_t *proxy = jsb_get_js_proxy(obj);
cobj = (cocos2d::Sprite3D *)(proxy ? proxy->ptr : NULL);
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Sprite3D_setMaterial : Invalid Native Object");
do {
if (argc == 2) {
cocos2d::Material* arg0;
do {
if (!args.get(0).isObject()) { ok = false; break; }
js_proxy_t *jsProxy;
JSObject *tmpObj = args.get(0).toObjectOrNull();
jsProxy = jsb_get_js_proxy(tmpObj);
arg0 = (cocos2d::Material*)(jsProxy ? jsProxy->ptr : NULL);
JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object");
} while (0);
if (!ok) { ok = true; break; }
int arg1;
ok &= jsval_to_int32(cx, args.get(1), (int32_t *)&arg1);
if (!ok) { ok = true; break; }
cobj->setMaterial(arg0, arg1);
args.rval().setUndefined();
return true;
}
} while(0);
do {
if (argc == 1) {
cocos2d::Material* arg0;
do {
if (!args.get(0).isObject()) { ok = false; break; }
js_proxy_t *jsProxy;
JSObject *tmpObj = args.get(0).toObjectOrNull();
jsProxy = jsb_get_js_proxy(tmpObj);
arg0 = (cocos2d::Material*)(jsProxy ? jsProxy->ptr : NULL);
JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object");
} while (0);
if (!ok) { ok = true; break; }
cobj->setMaterial(arg0);
args.rval().setUndefined();
return true;
}
} while(0);
JS_ReportError(cx, "js_cocos2dx_3d_Sprite3D_setMaterial : wrong number of arguments");
return false;
}
bool js_cocos2dx_3d_Sprite3D_genGLProgramState(JSContext *cx, uint32_t argc, jsval *vp)
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@ -1974,6 +2027,7 @@ void js_register_cocos2dx_3d_Sprite3D(JSContext *cx, JS::HandleObject global) {
JS_FN("setCullFace", js_cocos2dx_3d_Sprite3D_setCullFace, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("addMesh", js_cocos2dx_3d_Sprite3D_addMesh, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("removeAllAttachNode", js_cocos2dx_3d_Sprite3D_removeAllAttachNode, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("setMaterial", js_cocos2dx_3d_Sprite3D_setMaterial, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("genGLProgramState", js_cocos2dx_3d_Sprite3D_genGLProgramState, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("getMesh", js_cocos2dx_3d_Sprite3D_getMesh, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("createSprite3DNode", js_cocos2dx_3d_Sprite3D_createSprite3DNode, 3, JSPROP_PERMANENT | JSPROP_ENUMERATE),
@ -2264,6 +2318,31 @@ bool js_cocos2dx_3d_Mesh_getSkin(JSContext *cx, uint32_t argc, jsval *vp)
JS_ReportError(cx, "js_cocos2dx_3d_Mesh_getSkin : wrong number of arguments: %d, was expecting %d", argc, 0);
return false;
}
bool js_cocos2dx_3d_Mesh_getMaterial(JSContext *cx, uint32_t argc, jsval *vp)
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
JS::RootedObject obj(cx, args.thisv().toObjectOrNull());
js_proxy_t *proxy = jsb_get_js_proxy(obj);
cocos2d::Mesh* cobj = (cocos2d::Mesh *)(proxy ? proxy->ptr : NULL);
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Mesh_getMaterial : Invalid Native Object");
if (argc == 0) {
cocos2d::Material* ret = cobj->getMaterial();
jsval jsret = JSVAL_NULL;
do {
if (ret) {
js_proxy_t *jsProxy = js_get_or_create_proxy<cocos2d::Material>(cx, (cocos2d::Material*)ret);
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
} else {
jsret = JSVAL_NULL;
}
} while (0);
args.rval().set(jsret);
return true;
}
JS_ReportError(cx, "js_cocos2dx_3d_Mesh_getMaterial : wrong number of arguments: %d, was expecting %d", argc, 0);
return false;
}
bool js_cocos2dx_3d_Mesh_getVertexSizeInBytes(JSContext *cx, uint32_t argc, jsval *vp)
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@ -2282,6 +2361,33 @@ bool js_cocos2dx_3d_Mesh_getVertexSizeInBytes(JSContext *cx, uint32_t argc, jsva
JS_ReportError(cx, "js_cocos2dx_3d_Mesh_getVertexSizeInBytes : wrong number of arguments: %d, was expecting %d", argc, 0);
return false;
}
bool js_cocos2dx_3d_Mesh_setMaterial(JSContext *cx, uint32_t argc, jsval *vp)
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
bool ok = true;
JS::RootedObject obj(cx, args.thisv().toObjectOrNull());
js_proxy_t *proxy = jsb_get_js_proxy(obj);
cocos2d::Mesh* cobj = (cocos2d::Mesh *)(proxy ? proxy->ptr : NULL);
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Mesh_setMaterial : Invalid Native Object");
if (argc == 1) {
cocos2d::Material* arg0;
do {
if (!args.get(0).isObject()) { ok = false; break; }
js_proxy_t *jsProxy;
JSObject *tmpObj = args.get(0).toObjectOrNull();
jsProxy = jsb_get_js_proxy(tmpObj);
arg0 = (cocos2d::Material*)(jsProxy ? jsProxy->ptr : NULL);
JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object");
} while (0);
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_3d_Mesh_setMaterial : Error processing arguments");
cobj->setMaterial(arg0);
args.rval().setUndefined();
return true;
}
JS_ReportError(cx, "js_cocos2dx_3d_Mesh_setMaterial : wrong number of arguments: %d, was expecting %d", argc, 1);
return false;
}
bool js_cocos2dx_3d_Mesh_getName(JSContext *cx, uint32_t argc, jsval *vp)
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@ -2399,6 +2505,52 @@ bool js_cocos2dx_3d_Mesh_hasVertexAttrib(JSContext *cx, uint32_t argc, jsval *vp
JS_ReportError(cx, "js_cocos2dx_3d_Mesh_hasVertexAttrib : wrong number of arguments: %d, was expecting %d", argc, 1);
return false;
}
bool js_cocos2dx_3d_Mesh_draw(JSContext *cx, uint32_t argc, jsval *vp)
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
bool ok = true;
JS::RootedObject obj(cx, args.thisv().toObjectOrNull());
js_proxy_t *proxy = jsb_get_js_proxy(obj);
cocos2d::Mesh* cobj = (cocos2d::Mesh *)(proxy ? proxy->ptr : NULL);
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Mesh_draw : Invalid Native Object");
if (argc == 7) {
cocos2d::Renderer* arg0;
double arg1;
cocos2d::Mat4 arg2;
unsigned int arg3;
unsigned int arg4;
cocos2d::Vec4 arg5;
bool arg6;
do {
if (!args.get(0).isObject()) { ok = false; break; }
js_proxy_t *jsProxy;
JSObject *tmpObj = args.get(0).toObjectOrNull();
jsProxy = jsb_get_js_proxy(tmpObj);
arg0 = (cocos2d::Renderer*)(jsProxy ? jsProxy->ptr : NULL);
JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object");
} while (0);
ok &= JS::ToNumber( cx, args.get(1), &arg1) && !isnan(arg1);
ok &= jsval_to_matrix(cx, args.get(2), &arg2);
ok &= jsval_to_uint32(cx, args.get(3), &arg3);
ok &= jsval_to_uint32(cx, args.get(4), &arg4);
do {
if (!args.get(5).isObject()) { ok = false; break; }
js_proxy_t *jsProxy;
JSObject *tmpObj = args.get(5).toObjectOrNull();
jsProxy = jsb_get_js_proxy(tmpObj);
arg5 = (const cocos2d::Vec4&)(jsProxy ? jsProxy->ptr : NULL);
JSB_PRECONDITION2( arg5, cx, false, "Invalid Native Object");
} while (0);
arg6 = JS::ToBoolean(args.get(6));
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_3d_Mesh_draw : Error processing arguments");
cobj->draw(arg0, arg1, arg2, arg3, arg4, arg5, arg6);
args.rval().setUndefined();
return true;
}
JS_ReportError(cx, "js_cocos2dx_3d_Mesh_draw : wrong number of arguments: %d, was expecting %d", argc, 7);
return false;
}
bool js_cocos2dx_3d_Mesh_getBlendFunc(JSContext *cx, uint32_t argc, jsval *vp)
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@ -2462,24 +2614,6 @@ bool js_cocos2dx_3d_Mesh_setName(JSContext *cx, uint32_t argc, jsval *vp)
JS_ReportError(cx, "js_cocos2dx_3d_Mesh_setName : wrong number of arguments: %d, was expecting %d", argc, 1);
return false;
}
bool js_cocos2dx_3d_Mesh_isVisible(JSContext *cx, uint32_t argc, jsval *vp)
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
JS::RootedObject obj(cx, args.thisv().toObjectOrNull());
js_proxy_t *proxy = jsb_get_js_proxy(obj);
cocos2d::Mesh* cobj = (cocos2d::Mesh *)(proxy ? proxy->ptr : NULL);
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Mesh_isVisible : Invalid Native Object");
if (argc == 0) {
bool ret = cobj->isVisible();
jsval jsret = JSVAL_NULL;
jsret = BOOLEAN_TO_JSVAL(ret);
args.rval().set(jsret);
return true;
}
JS_ReportError(cx, "js_cocos2dx_3d_Mesh_isVisible : wrong number of arguments: %d, was expecting %d", argc, 0);
return false;
}
bool js_cocos2dx_3d_Mesh_getIndexCount(JSContext *cx, uint32_t argc, jsval *vp)
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@ -2498,22 +2632,6 @@ bool js_cocos2dx_3d_Mesh_getIndexCount(JSContext *cx, uint32_t argc, jsval *vp)
JS_ReportError(cx, "js_cocos2dx_3d_Mesh_getIndexCount : wrong number of arguments: %d, was expecting %d", argc, 0);
return false;
}
bool js_cocos2dx_3d_Mesh_bindMeshCommand(JSContext *cx, uint32_t argc, jsval *vp)
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
JS::RootedObject obj(cx, args.thisv().toObjectOrNull());
js_proxy_t *proxy = jsb_get_js_proxy(obj);
cocos2d::Mesh* cobj = (cocos2d::Mesh *)(proxy ? proxy->ptr : NULL);
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Mesh_bindMeshCommand : Invalid Native Object");
if (argc == 0) {
cobj->bindMeshCommand();
args.rval().setUndefined();
return true;
}
JS_ReportError(cx, "js_cocos2dx_3d_Mesh_bindMeshCommand : wrong number of arguments: %d, was expecting %d", argc, 0);
return false;
}
bool js_cocos2dx_3d_Mesh_setMeshIndexData(JSContext *cx, uint32_t argc, jsval *vp)
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@ -2624,6 +2742,24 @@ bool js_cocos2dx_3d_Mesh_setSkin(JSContext *cx, uint32_t argc, jsval *vp)
JS_ReportError(cx, "js_cocos2dx_3d_Mesh_setSkin : wrong number of arguments: %d, was expecting %d", argc, 1);
return false;
}
bool js_cocos2dx_3d_Mesh_isVisible(JSContext *cx, uint32_t argc, jsval *vp)
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
JS::RootedObject obj(cx, args.thisv().toObjectOrNull());
js_proxy_t *proxy = jsb_get_js_proxy(obj);
cocos2d::Mesh* cobj = (cocos2d::Mesh *)(proxy ? proxy->ptr : NULL);
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Mesh_isVisible : Invalid Native Object");
if (argc == 0) {
bool ret = cobj->isVisible();
jsval jsret = JSVAL_NULL;
jsret = BOOLEAN_TO_JSVAL(ret);
args.rval().set(jsret);
return true;
}
JS_ReportError(cx, "js_cocos2dx_3d_Mesh_isVisible : wrong number of arguments: %d, was expecting %d", argc, 0);
return false;
}
bool js_cocos2dx_3d_Mesh_getIndexBuffer(JSContext *cx, uint32_t argc, jsval *vp)
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@ -2746,24 +2882,26 @@ void js_register_cocos2dx_3d_Mesh(JSContext *cx, JS::HandleObject global) {
JS_FN("setTexture", js_cocos2dx_3d_Mesh_setTexture, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("getTexture", js_cocos2dx_3d_Mesh_getTexture, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("getSkin", js_cocos2dx_3d_Mesh_getSkin, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("getMaterial", js_cocos2dx_3d_Mesh_getMaterial, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("getVertexSizeInBytes", js_cocos2dx_3d_Mesh_getVertexSizeInBytes, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("setMaterial", js_cocos2dx_3d_Mesh_setMaterial, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("getName", js_cocos2dx_3d_Mesh_getName, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("getIndexFormat", js_cocos2dx_3d_Mesh_getIndexFormat, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("getGLProgramState", js_cocos2dx_3d_Mesh_getGLProgramState, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("getVertexBuffer", js_cocos2dx_3d_Mesh_getVertexBuffer, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("calculateAABB", js_cocos2dx_3d_Mesh_calculateAABB, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("hasVertexAttrib", js_cocos2dx_3d_Mesh_hasVertexAttrib, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("draw", js_cocos2dx_3d_Mesh_draw, 7, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("getBlendFunc", js_cocos2dx_3d_Mesh_getBlendFunc, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("getMeshIndexData", js_cocos2dx_3d_Mesh_getMeshIndexData, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("setName", js_cocos2dx_3d_Mesh_setName, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("isVisible", js_cocos2dx_3d_Mesh_isVisible, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("getIndexCount", js_cocos2dx_3d_Mesh_getIndexCount, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("bindMeshCommand", js_cocos2dx_3d_Mesh_bindMeshCommand, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("setMeshIndexData", js_cocos2dx_3d_Mesh_setMeshIndexData, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("getMeshVertexAttribCount", js_cocos2dx_3d_Mesh_getMeshVertexAttribCount, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("setBlendFunc", js_cocos2dx_3d_Mesh_setBlendFunc, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("getPrimitiveType", js_cocos2dx_3d_Mesh_getPrimitiveType, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("setSkin", js_cocos2dx_3d_Mesh_setSkin, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("isVisible", js_cocos2dx_3d_Mesh_isVisible, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("getIndexBuffer", js_cocos2dx_3d_Mesh_getIndexBuffer, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("setGLProgramState", js_cocos2dx_3d_Mesh_setGLProgramState, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("setVisible", js_cocos2dx_3d_Mesh_setVisible, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),

View File

@ -76,6 +76,7 @@ bool js_cocos2dx_3d_Sprite3D_loadFromFile(JSContext *cx, uint32_t argc, jsval *v
bool js_cocos2dx_3d_Sprite3D_setCullFace(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_3d_Sprite3D_addMesh(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_3d_Sprite3D_removeAllAttachNode(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_3d_Sprite3D_setMaterial(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_3d_Sprite3D_genGLProgramState(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_3d_Sprite3D_getMesh(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_3d_Sprite3D_createSprite3DNode(JSContext *cx, uint32_t argc, jsval *vp);
@ -122,24 +123,26 @@ void register_all_cocos2dx_3d(JSContext* cx, JS::HandleObject obj);
bool js_cocos2dx_3d_Mesh_setTexture(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_3d_Mesh_getTexture(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_3d_Mesh_getSkin(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_3d_Mesh_getMaterial(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_3d_Mesh_getVertexSizeInBytes(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_3d_Mesh_setMaterial(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_3d_Mesh_getName(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_3d_Mesh_getIndexFormat(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_3d_Mesh_getGLProgramState(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_3d_Mesh_getVertexBuffer(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_3d_Mesh_calculateAABB(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_3d_Mesh_hasVertexAttrib(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_3d_Mesh_draw(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_3d_Mesh_getBlendFunc(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_3d_Mesh_getMeshIndexData(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_3d_Mesh_setName(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_3d_Mesh_isVisible(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_3d_Mesh_getIndexCount(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_3d_Mesh_bindMeshCommand(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_3d_Mesh_setMeshIndexData(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_3d_Mesh_getMeshVertexAttribCount(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_3d_Mesh_setBlendFunc(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_3d_Mesh_getPrimitiveType(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_3d_Mesh_setSkin(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_3d_Mesh_isVisible(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_3d_Mesh_getIndexBuffer(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_3d_Mesh_setGLProgramState(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_3d_Mesh_setVisible(JSContext *cx, uint32_t argc, jsval *vp);

File diff suppressed because it is too large Load Diff

View File

@ -189,11 +189,13 @@ bool js_cocos2dx_Node_setOnEnterCallback(JSContext *cx, uint32_t argc, jsval *vp
bool js_cocos2dx_Node_setNormalizedPosition(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_Node_setonExitTransitionDidStartCallback(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_Node_convertTouchToNodeSpace(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_Node_getMaterial(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_Node_removeAllChildrenWithCleanup(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_Node_getRotationSkewX(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_Node_getRotationSkewY(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_Node_getNodeToWorldTransform(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_Node_isCascadeOpacityEnabled(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_Node_setMaterial(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_Node_setParent(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_Node_getName(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_Node_getRotation3D(JSContext *cx, uint32_t argc, jsval *vp);
@ -2004,26 +2006,31 @@ bool js_cocos2dx_GLProgramState_constructor(JSContext *cx, uint32_t argc, jsval
void js_cocos2dx_GLProgramState_finalize(JSContext *cx, JSObject *obj);
void js_register_cocos2dx_GLProgramState(JSContext *cx, JS::HandleObject global);
void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj);
bool js_cocos2dx_GLProgramState_setUniformTexture(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_GLProgramState_setUniformMat4(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_GLProgramState_applyUniforms(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_GLProgramState_setUniformCallback(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_GLProgramState_applyGLProgram(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_GLProgramState_getUniformCount(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_GLProgramState_applyAttributes(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_GLProgramState_setUniformFloat(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_GLProgramState_setUniformVec3(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_GLProgramState_setUniformInt(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_GLProgramState_getVertexAttribCount(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_GLProgramState_setGLProgram(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_GLProgramState_setUniformVec2(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_GLProgramState_getVertexAttribsFlags(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_GLProgramState_setUniformVec2(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_GLProgramState_setUniformVec3(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_GLProgramState_setVertexAttribCallback(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_GLProgramState_apply(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_GLProgramState_applyGLProgram(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_GLProgramState_setUniformInt(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_GLProgramState_setUniformVec2v(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_GLProgramState_getUniformCount(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_GLProgramState_applyAttributes(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_GLProgramState_clone(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_GLProgramState_setGLProgram(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_GLProgramState_setUniformFloatv(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_GLProgramState_getGLProgram(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_GLProgramState_setUniformTexture(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_GLProgramState_applyUniforms(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_GLProgramState_setUniformFloat(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_GLProgramState_setUniformMat4(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_GLProgramState_setUniformVec3v(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_GLProgramState_getVertexAttribCount(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_GLProgramState_create(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_GLProgramState_getOrCreateWithGLProgramName(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_GLProgramState_getOrCreateWithGLProgram(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_GLProgramState_getOrCreateWithShaders(JSContext *cx, uint32_t argc, jsval *vp);
extern JSClass *jsb_cocos2d_AtlasNode_class;
extern JSObject *jsb_cocos2d_AtlasNode_prototype;

View File

@ -11,21 +11,25 @@
-- @return string#string ret (return value: string)
--------------------------------
--
-- @function [parent=#GLProgram] initWithByteArrays
-- @overload self, char, char, string
-- @overload self, char, char
-- @function [parent=#GLProgram] initWithByteArrays
-- @param self
-- @param #char vShaderByteArray
-- @param #char fShaderByteArray
-- @param #string compileTimeDefines
-- @return bool#bool ret (return value: bool)
--------------------------------
--
-- @function [parent=#GLProgram] initWithFilenames
-- @overload self, string, string, string
-- @overload self, string, string
-- @function [parent=#GLProgram] initWithFilenames
-- @param self
-- @param #string vShaderFilename
-- @param #string fShaderFilename
-- @param #string compileTimeDefines
-- @return bool#bool ret (return value: bool)
--------------------------------
-- it will call glUseProgram()
-- @function [parent=#GLProgram] use
@ -96,28 +100,25 @@
-- @return bool#bool ret (return value: bool)
--------------------------------
-- @{<br>
-- Create or Initializes the GLProgram with a vertex and fragment with bytes array.<br>
-- js initWithString.<br>
-- lua initWithString.
-- @function [parent=#GLProgram] createWithByteArrays
-- @overload self, char, char, string
-- @overload self, char, char
-- @function [parent=#GLProgram] createWithByteArrays
-- @param self
-- @param #char vShaderByteArray
-- @param #char fShaderByteArray
-- @param #string compileTimeDefines
-- @return GLProgram#GLProgram ret (return value: cc.GLProgram)
--------------------------------
-- }<br>
-- {<br>
-- Create or Initializes the GLProgram with a vertex and fragment with contents of filenames.<br>
-- js init<br>
-- lua init
-- @function [parent=#GLProgram] createWithFilenames
-- @overload self, string, string, string
-- @overload self, string, string
-- @function [parent=#GLProgram] createWithFilenames
-- @param self
-- @param #string vShaderFilename
-- @param #string fShaderFilename
-- @param #string compileTimeDefines
-- @return GLProgram#GLProgram ret (return value: cc.GLProgram)
--------------------------------
-- Constructor.
-- @function [parent=#GLProgram] GLProgram

View File

@ -5,31 +5,56 @@
-- @parent_module cc
--------------------------------
-- @overload self, string, unsigned int
-- @overload self, string, cc.Texture2D
-- @overload self, int, cc.Texture2D
-- @overload self, int, unsigned int
-- @function [parent=#GLProgramState] setUniformTexture
-- Get the flag of vertex attribs used by OR operation.
-- @function [parent=#GLProgramState] getVertexAttribsFlags
-- @param self
-- @param #int uniformLocation
-- @param #unsigned int textureId
-- @return GLProgramState#GLProgramState self (return value: cc.GLProgramState)
-- @return unsigned int#unsigned int ret (return value: unsigned int)
--------------------------------
-- @overload self, int, mat4_table
-- @overload self, string, mat4_table
-- @function [parent=#GLProgramState] setUniformMat4
-- @overload self, int, vec4_table
-- @overload self, string, vec4_table
-- @function [parent=#GLProgramState] setUniformVec4
-- @param self
-- @param #string uniformName
-- @param #mat4_table value
-- @param #vec4_table value
-- @return GLProgramState#GLProgramState self (return value: cc.GLProgramState)
--------------------------------
-- Apply user defined uniforms.
-- @function [parent=#GLProgramState] applyUniforms
-- @overload self, int, vec2_table
-- @overload self, string, vec2_table
-- @function [parent=#GLProgramState] setUniformVec2
-- @param self
-- @param #string uniformName
-- @param #vec2_table value
-- @return GLProgramState#GLProgramState self (return value: cc.GLProgramState)
--------------------------------
-- @overload self, int, vec3_table
-- @overload self, string, vec3_table
-- @function [parent=#GLProgramState] setUniformVec3
-- @param self
-- @param #string uniformName
-- @param #vec3_table value
-- @return GLProgramState#GLProgramState self (return value: cc.GLProgramState)
--------------------------------
-- Apply GLProgram, attributes and uniforms.<br>
-- param modelView The applied modelView matrix to shader.
-- @function [parent=#GLProgramState] apply
-- @param self
-- @param #mat4_table modelView
-- @return GLProgramState#GLProgramState self (return value: cc.GLProgramState)
--------------------------------
-- @overload self, int, vec4_table, long
-- @overload self, string, vec4_table, long
-- @function [parent=#GLProgramState] setUniformVec4v
-- @param self
-- @param #string uniformName
-- @param #vec4_table pointer
-- @param #long size
-- @return GLProgramState#GLProgramState self (return value: cc.GLProgramState)
--------------------------------
-- Apply GLProgram, and built in uniforms.<br>
-- param modelView The applied modelView matrix to shader.
@ -38,6 +63,25 @@
-- @param #mat4_table modelView
-- @return GLProgramState#GLProgramState self (return value: cc.GLProgramState)
--------------------------------
-- @overload self, int, int
-- @overload self, string, int
-- @function [parent=#GLProgramState] setUniformInt
-- @param self
-- @param #string uniformName
-- @param #int value
-- @return GLProgramState#GLProgramState self (return value: cc.GLProgramState)
--------------------------------
-- @overload self, int, vec2_table, long
-- @overload self, string, vec2_table, long
-- @function [parent=#GLProgramState] setUniformVec2v
-- @param self
-- @param #string uniformName
-- @param #vec2_table pointer
-- @param #long size
-- @return GLProgramState#GLProgramState self (return value: cc.GLProgramState)
--------------------------------
-- Get the number of user defined uniform count.
-- @function [parent=#GLProgramState] getUniformCount
@ -52,47 +96,11 @@
-- @return GLProgramState#GLProgramState self (return value: cc.GLProgramState)
--------------------------------
-- @overload self, int, float
-- @overload self, string, float
-- @function [parent=#GLProgramState] setUniformFloat
-- Returns a new copy of the GLProgramState. The GLProgram is reused
-- @function [parent=#GLProgramState] clone
-- @param self
-- @param #string uniformName
-- @param #float value
-- @return GLProgramState#GLProgramState self (return value: cc.GLProgramState)
--------------------------------
-- @overload self, int, vec3_table
-- @overload self, string, vec3_table
-- @function [parent=#GLProgramState] setUniformVec3
-- @param self
-- @param #string uniformName
-- @param #vec3_table value
-- @return GLProgramState#GLProgramState self (return value: cc.GLProgramState)
--------------------------------
-- @overload self, int, int
-- @overload self, string, int
-- @function [parent=#GLProgramState] setUniformInt
-- @param self
-- @param #string uniformName
-- @param #int value
-- @return GLProgramState#GLProgramState self (return value: cc.GLProgramState)
--------------------------------
-- Get the number of vertex attributes.
-- @function [parent=#GLProgramState] getVertexAttribCount
-- @param self
-- @return long#long ret (return value: long)
-- @return GLProgramState#GLProgramState ret (return value: cc.GLProgramState)
--------------------------------
-- @overload self, int, vec4_table
-- @overload self, string, vec4_table
-- @function [parent=#GLProgramState] setUniformVec4
-- @param self
-- @param #string uniformName
-- @param #vec4_table value
-- @return GLProgramState#GLProgramState self (return value: cc.GLProgramState)
--------------------------------
-- @{ <br>
-- Setter and Getter of the owner GLProgram binded in this program state.
@ -102,34 +110,72 @@
-- @return GLProgramState#GLProgramState self (return value: cc.GLProgramState)
--------------------------------
-- @overload self, int, vec2_table
-- @overload self, string, vec2_table
-- @function [parent=#GLProgramState] setUniformVec2
-- @overload self, int, float, long
-- @overload self, string, float, long
-- @function [parent=#GLProgramState] setUniformFloatv
-- @param self
-- @param #string uniformName
-- @param #vec2_table value
-- @param #float pointer
-- @param #long size
-- @return GLProgramState#GLProgramState self (return value: cc.GLProgramState)
--------------------------------
-- Get the flag of vertex attribs used by OR operation.
-- @function [parent=#GLProgramState] getVertexAttribsFlags
-- @param self
-- @return unsigned int#unsigned int ret (return value: unsigned int)
--------------------------------
-- Apply GLProgram, attributes and uniforms.<br>
-- param modelView The applied modelView matrix to shader.
-- @function [parent=#GLProgramState] apply
-- @param self
-- @param #mat4_table modelView
-- @return GLProgramState#GLProgramState self (return value: cc.GLProgramState)
--------------------------------
--
-- @function [parent=#GLProgramState] getGLProgram
-- @param self
-- @return GLProgram#GLProgram ret (return value: cc.GLProgram)
--------------------------------
-- @overload self, string, unsigned int
-- @overload self, string, cc.Texture2D
-- @overload self, int, cc.Texture2D
-- @overload self, int, unsigned int
-- @function [parent=#GLProgramState] setUniformTexture
-- @param self
-- @param #int uniformLocation
-- @param #unsigned int textureId
-- @return GLProgramState#GLProgramState self (return value: cc.GLProgramState)
--------------------------------
-- Apply user defined uniforms.
-- @function [parent=#GLProgramState] applyUniforms
-- @param self
-- @return GLProgramState#GLProgramState self (return value: cc.GLProgramState)
--------------------------------
-- @overload self, int, float
-- @overload self, string, float
-- @function [parent=#GLProgramState] setUniformFloat
-- @param self
-- @param #string uniformName
-- @param #float value
-- @return GLProgramState#GLProgramState self (return value: cc.GLProgramState)
--------------------------------
-- @overload self, int, mat4_table
-- @overload self, string, mat4_table
-- @function [parent=#GLProgramState] setUniformMat4
-- @param self
-- @param #string uniformName
-- @param #mat4_table value
-- @return GLProgramState#GLProgramState self (return value: cc.GLProgramState)
--------------------------------
-- @overload self, int, vec3_table, long
-- @overload self, string, vec3_table, long
-- @function [parent=#GLProgramState] setUniformVec3v
-- @param self
-- @param #string uniformName
-- @param #vec3_table pointer
-- @param #long size
-- @return GLProgramState#GLProgramState self (return value: cc.GLProgramState)
--------------------------------
-- Get the number of vertex attributes.
-- @function [parent=#GLProgramState] getVertexAttribCount
-- @param self
-- @return long#long ret (return value: long)
--------------------------------
-- returns a new instance of GLProgramState for a given GLProgram
-- @function [parent=#GLProgramState] create
@ -151,4 +197,13 @@
-- @param #cc.GLProgram glprogram
-- @return GLProgramState#GLProgramState ret (return value: cc.GLProgramState)
--------------------------------
-- gets-or-creates an instance of GLProgramState for given shaders
-- @function [parent=#GLProgramState] getOrCreateWithShaders
-- @param self
-- @param #string vertexShader
-- @param #string fragShader
-- @param #string compileTimeDefines
-- @return GLProgramState#GLProgramState ret (return value: cc.GLProgramState)
return nil

View File

@ -18,12 +18,25 @@
-- @param self
-- @return Texture2D#Texture2D ret (return value: cc.Texture2D)
--------------------------------
-- Returns the Material being used by the Mesh
-- @function [parent=#Mesh] getMaterial
-- @param self
-- @return Material#Material ret (return value: cc.Material)
--------------------------------
-- get per vertex size in bytes
-- @function [parent=#Mesh] getVertexSizeInBytes
-- @param self
-- @return int#int ret (return value: int)
--------------------------------
-- Sets a new Material to the Mesh
-- @function [parent=#Mesh] setMaterial
-- @param self
-- @param #cc.Material material
-- @return Mesh#Mesh self (return value: cc.Mesh)
--------------------------------
-- name getter
-- @function [parent=#Mesh] getName
@ -44,6 +57,19 @@
-- @param self
-- @return Mesh#Mesh self (return value: cc.Mesh)
--------------------------------
--
-- @function [parent=#Mesh] draw
-- @param self
-- @param #cc.Renderer renderer
-- @param #float globalZ
-- @param #mat4_table transform
-- @param #unsigned int flags
-- @param #unsigned int lightMask
-- @param #vec4_table color
-- @param #bool forceDepthWrite
-- @return Mesh#Mesh self (return value: cc.Mesh)
--------------------------------
--
-- @function [parent=#Mesh] getBlendFunc
@ -57,18 +83,6 @@
-- @param #string name
-- @return Mesh#Mesh self (return value: cc.Mesh)
--------------------------------
--
-- @function [parent=#Mesh] isVisible
-- @param self
-- @return bool#bool ret (return value: bool)
--------------------------------
-- Bind to the MeshCommand
-- @function [parent=#Mesh] bindMeshCommand
-- @param self
-- @return Mesh#Mesh self (return value: cc.Mesh)
--------------------------------
-- Mesh index data setter
-- @function [parent=#Mesh] setMeshIndexData
@ -97,7 +111,14 @@
-- @return Mesh#Mesh self (return value: cc.Mesh)
--------------------------------
-- Set the default GL program.
--
-- @function [parent=#Mesh] isVisible
-- @param self
-- @return bool#bool ret (return value: bool)
--------------------------------
-- Sets a new GLProgramState for the Mesh<br>
-- A new Material will be created for it
-- @function [parent=#Mesh] setGLProgramState
-- @param self
-- @param #cc.GLProgramState glProgramState

View File

@ -336,6 +336,12 @@
-- @param #cc.Touch touch
-- @return vec2_table#vec2_table ret (return value: vec2_table)
--------------------------------
-- Returns the Material used for this Node
-- @function [parent=#Node] getMaterial
-- @param self
-- @return Material#Material ret (return value: cc.Material)
--------------------------------
-- @overload self, bool
-- @overload self
@ -356,6 +362,13 @@
-- @param self
-- @return bool#bool ret (return value: bool)
--------------------------------
-- Sets the Material used for this Node
-- @function [parent=#Node] setMaterial
-- @param self
-- @param #cc.Material material
-- @return Node#Node self (return value: cc.Node)
--------------------------------
-- Sets the parent node.<br>
-- param parent A pointer to the parent node.

View File

@ -38,6 +38,15 @@
-- @param self
-- @return Sprite3D#Sprite3D self (return value: cc.Sprite3D)
--------------------------------
-- @overload self, cc.Material, int
-- @overload self, cc.Material
-- @function [parent=#Sprite3D] setMaterial
-- @param self
-- @param #cc.Material material
-- @param #int meshIndex
-- @return Sprite3D#Sprite3D self (return value: cc.Sprite3D)
--------------------------------
-- get mesh
-- @function [parent=#Sprite3D] getMesh

View File

@ -1833,6 +1833,65 @@ int lua_cocos2dx_3d_Sprite3D_removeAllAttachNode(lua_State* tolua_S)
return 0;
}
int lua_cocos2dx_3d_Sprite3D_setMaterial(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_3d_Sprite3D_setMaterial'", nullptr);
return 0;
}
#endif
argc = lua_gettop(tolua_S)-1;
do{
if (argc == 2) {
cocos2d::Material* arg0;
ok &= luaval_to_object<cocos2d::Material>(tolua_S, 2, "cc.Material",&arg0);
if (!ok) { break; }
int arg1;
ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.Sprite3D:setMaterial");
if (!ok) { break; }
cobj->setMaterial(arg0, arg1);
lua_settop(tolua_S, 1);
return 1;
}
}while(0);
ok = true;
do{
if (argc == 1) {
cocos2d::Material* arg0;
ok &= luaval_to_object<cocos2d::Material>(tolua_S, 2, "cc.Material",&arg0);
if (!ok) { break; }
cobj->setMaterial(arg0);
lua_settop(tolua_S, 1);
return 1;
}
}while(0);
ok = true;
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:setMaterial",argc, 1);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_setMaterial'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_3d_Sprite3D_getMesh(lua_State* tolua_S)
{
int argc = 0;
@ -2496,6 +2555,7 @@ int lua_register_cocos2dx_3d_Sprite3D(lua_State* tolua_S)
tolua_function(tolua_S,"getLightMask",lua_cocos2dx_3d_Sprite3D_getLightMask);
tolua_function(tolua_S,"setCullFace",lua_cocos2dx_3d_Sprite3D_setCullFace);
tolua_function(tolua_S,"removeAllAttachNode",lua_cocos2dx_3d_Sprite3D_removeAllAttachNode);
tolua_function(tolua_S,"setMaterial",lua_cocos2dx_3d_Sprite3D_setMaterial);
tolua_function(tolua_S,"getMesh",lua_cocos2dx_3d_Sprite3D_getMesh);
tolua_function(tolua_S,"getMeshCount",lua_cocos2dx_3d_Sprite3D_getMeshCount);
tolua_function(tolua_S,"getMeshByIndex",lua_cocos2dx_3d_Sprite3D_getMeshByIndex);
@ -2842,6 +2902,53 @@ int lua_cocos2dx_3d_Mesh_getTexture(lua_State* tolua_S)
return 0;
}
int lua_cocos2dx_3d_Mesh_getMaterial(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_3d_Mesh_getMaterial'", nullptr);
return 0;
}
#endif
argc = lua_gettop(tolua_S)-1;
if (argc == 0)
{
if(!ok)
{
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Mesh_getMaterial'", nullptr);
return 0;
}
cocos2d::Material* ret = cobj->getMaterial();
object_to_luaval<cocos2d::Material>(tolua_S, "cc.Material",(cocos2d::Material*)ret);
return 1;
}
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Mesh:getMaterial",argc, 0);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Mesh_getMaterial'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_3d_Mesh_getVertexSizeInBytes(lua_State* tolua_S)
{
int argc = 0;
@ -2889,6 +2996,56 @@ int lua_cocos2dx_3d_Mesh_getVertexSizeInBytes(lua_State* tolua_S)
return 0;
}
int lua_cocos2dx_3d_Mesh_setMaterial(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_3d_Mesh_setMaterial'", nullptr);
return 0;
}
#endif
argc = lua_gettop(tolua_S)-1;
if (argc == 1)
{
cocos2d::Material* arg0;
ok &= luaval_to_object<cocos2d::Material>(tolua_S, 2, "cc.Material",&arg0);
if(!ok)
{
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Mesh_setMaterial'", nullptr);
return 0;
}
cobj->setMaterial(arg0);
lua_settop(tolua_S, 1);
return 1;
}
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Mesh:setMaterial",argc, 1);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Mesh_setMaterial'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_3d_Mesh_getName(lua_State* tolua_S)
{
int argc = 0;
@ -3033,6 +3190,74 @@ int lua_cocos2dx_3d_Mesh_calculateAABB(lua_State* tolua_S)
return 0;
}
int lua_cocos2dx_3d_Mesh_draw(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_3d_Mesh_draw'", nullptr);
return 0;
}
#endif
argc = lua_gettop(tolua_S)-1;
if (argc == 7)
{
cocos2d::Renderer* arg0;
double arg1;
cocos2d::Mat4 arg2;
unsigned int arg3;
unsigned int arg4;
cocos2d::Vec4 arg5;
bool arg6;
ok &= luaval_to_object<cocos2d::Renderer>(tolua_S, 2, "cc.Renderer",&arg0);
ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.Mesh:draw");
ok &= luaval_to_mat4(tolua_S, 4, &arg2, "cc.Mesh:draw");
ok &= luaval_to_uint32(tolua_S, 5,&arg3, "cc.Mesh:draw");
ok &= luaval_to_uint32(tolua_S, 6,&arg4, "cc.Mesh:draw");
ok &= luaval_to_vec4(tolua_S, 7, &arg5, "cc.Mesh:draw");
ok &= luaval_to_boolean(tolua_S, 8,&arg6, "cc.Mesh:draw");
if(!ok)
{
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Mesh_draw'", nullptr);
return 0;
}
cobj->draw(arg0, arg1, arg2, arg3, arg4, arg5, arg6);
lua_settop(tolua_S, 1);
return 1;
}
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Mesh:draw",argc, 7);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Mesh_draw'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_3d_Mesh_getBlendFunc(lua_State* tolua_S)
{
int argc = 0;
@ -3130,100 +3355,6 @@ int lua_cocos2dx_3d_Mesh_setName(lua_State* tolua_S)
return 0;
}
int lua_cocos2dx_3d_Mesh_isVisible(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_3d_Mesh_isVisible'", nullptr);
return 0;
}
#endif
argc = lua_gettop(tolua_S)-1;
if (argc == 0)
{
if(!ok)
{
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Mesh_isVisible'", nullptr);
return 0;
}
bool ret = cobj->isVisible();
tolua_pushboolean(tolua_S,(bool)ret);
return 1;
}
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Mesh:isVisible",argc, 0);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Mesh_isVisible'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_3d_Mesh_bindMeshCommand(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_3d_Mesh_bindMeshCommand'", nullptr);
return 0;
}
#endif
argc = lua_gettop(tolua_S)-1;
if (argc == 0)
{
if(!ok)
{
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Mesh_bindMeshCommand'", nullptr);
return 0;
}
cobj->bindMeshCommand();
lua_settop(tolua_S, 1);
return 1;
}
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Mesh:bindMeshCommand",argc, 0);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Mesh_bindMeshCommand'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_3d_Mesh_setMeshIndexData(lua_State* tolua_S)
{
int argc = 0;
@ -3421,6 +3552,53 @@ int lua_cocos2dx_3d_Mesh_setSkin(lua_State* tolua_S)
return 0;
}
int lua_cocos2dx_3d_Mesh_isVisible(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_3d_Mesh_isVisible'", nullptr);
return 0;
}
#endif
argc = lua_gettop(tolua_S)-1;
if (argc == 0)
{
if(!ok)
{
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Mesh_isVisible'", nullptr);
return 0;
}
bool ret = cobj->isVisible();
tolua_pushboolean(tolua_S,(bool)ret);
return 1;
}
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Mesh:isVisible",argc, 0);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Mesh_isVisible'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_3d_Mesh_setGLProgramState(lua_State* tolua_S)
{
int argc = 0;
@ -3573,18 +3751,20 @@ int lua_register_cocos2dx_3d_Mesh(lua_State* tolua_S)
tolua_function(tolua_S,"new",lua_cocos2dx_3d_Mesh_constructor);
tolua_function(tolua_S,"setTexture",lua_cocos2dx_3d_Mesh_setTexture);
tolua_function(tolua_S,"getTexture",lua_cocos2dx_3d_Mesh_getTexture);
tolua_function(tolua_S,"getMaterial",lua_cocos2dx_3d_Mesh_getMaterial);
tolua_function(tolua_S,"getVertexSizeInBytes",lua_cocos2dx_3d_Mesh_getVertexSizeInBytes);
tolua_function(tolua_S,"setMaterial",lua_cocos2dx_3d_Mesh_setMaterial);
tolua_function(tolua_S,"getName",lua_cocos2dx_3d_Mesh_getName);
tolua_function(tolua_S,"getMeshVertexAttribute",lua_cocos2dx_3d_Mesh_getMeshVertexAttribute);
tolua_function(tolua_S,"calculateAABB",lua_cocos2dx_3d_Mesh_calculateAABB);
tolua_function(tolua_S,"draw",lua_cocos2dx_3d_Mesh_draw);
tolua_function(tolua_S,"getBlendFunc",lua_cocos2dx_3d_Mesh_getBlendFunc);
tolua_function(tolua_S,"setName",lua_cocos2dx_3d_Mesh_setName);
tolua_function(tolua_S,"isVisible",lua_cocos2dx_3d_Mesh_isVisible);
tolua_function(tolua_S,"bindMeshCommand",lua_cocos2dx_3d_Mesh_bindMeshCommand);
tolua_function(tolua_S,"setMeshIndexData",lua_cocos2dx_3d_Mesh_setMeshIndexData);
tolua_function(tolua_S,"getMeshVertexAttribCount",lua_cocos2dx_3d_Mesh_getMeshVertexAttribCount);
tolua_function(tolua_S,"setBlendFunc",lua_cocos2dx_3d_Mesh_setBlendFunc);
tolua_function(tolua_S,"setSkin",lua_cocos2dx_3d_Mesh_setSkin);
tolua_function(tolua_S,"isVisible",lua_cocos2dx_3d_Mesh_isVisible);
tolua_function(tolua_S,"setGLProgramState",lua_cocos2dx_3d_Mesh_setGLProgramState);
tolua_function(tolua_S,"setVisible",lua_cocos2dx_3d_Mesh_setVisible);
tolua_endmodule(tolua_S);

View File

@ -123,6 +123,9 @@ int register_all_cocos2dx_3d(lua_State* tolua_S);

File diff suppressed because it is too large Load Diff

View File

@ -1954,6 +1954,14 @@ int register_all_cocos2dx(lua_State* tolua_S);