Beispiel #1
0
static int rendersystem_addmodel(lua_State* L){
    RenderSystem* cobj = *reinterpret_cast<RenderSystem**>(lua_touserdata(L, 1));
    if (!cobj) {
        luaL_error(L,"invalid 'cobj' in function 'AddModel'", nullptr);
        return 0;
    }

    int argc = lua_gettop(L)-1;
    if (argc == 1) {
        Model* arg0 = *reinterpret_cast<Model**>(lua_touserdata(L, 2));
        bool ret = cobj->AddModel(arg0);
        lua_pushboolean(L, ret);
        return 1;
    }

    return 0;
}