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

    int argc = lua_gettop(L)-1;
    if (argc == 1) {
        const char* arg0 = lua_tostring(L, 2);
        cobj->DrawString(arg0);
    }

    return 0;
}