Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void Push(Vec3 var)
- {
- Vec3 *ubox = (Vec3 *)lua_newuserdata(lua->L, sizeof(Vec3));
- *ubox = var;
- luaL_getmetatable(lua->L, meta_name);
- lua_setmetatable(lua->L, -2);
- }
- Vec3 *Get(int index)
- {
- Vec3 var = *(Vec3 *)luaL_checkudata(L, 1, "Vec3");
- return var;
- }
Advertisement
Add Comment
Please, Sign In to add comment