Added locking to SpriteBatch, and conf.lua.

This commit is contained in:
rude
2009-07-27 15:17:54 +02:00
parent 4f32377efa
commit 5c068db487
7 changed files with 396 additions and 248 deletions
@@ -52,9 +52,25 @@ namespace opengl
return 0;
}
int _wrap_SpriteBatch_lock(lua_State * L)
{
SpriteBatch * t = luax_checkspritebatch(L, 1);
lua_pushlightuserdata(L, t->lock());
return 1;
}
int _wrap_SpriteBatch_unlock(lua_State * L)
{
SpriteBatch * t = luax_checkspritebatch(L, 1);
t->unlock();
return 0;
}
static const luaL_Reg wrap_SpriteBatch_functions[] = {
{ "add", _wrap_SpriteBatch_add },
{ "clear", _wrap_SpriteBatch_clear },
{ "lock", _wrap_SpriteBatch_lock },
{ "unlock", _wrap_SpriteBatch_unlock },
{ 0, 0 }
};