fixed bug in Engine::Object destructor
git-svn-id: svn://anubis/anaglym/trunk@133 99a6e188-d820-4881-8870-2d33a10e2619
This commit is contained in:
parent
2616100ded
commit
e0d20f1a2b
@ -665,6 +665,8 @@ Engine::Object::Object(const Engine::Object & orig)
|
|||||||
Engine::Object::~Object()
|
Engine::Object::~Object()
|
||||||
{
|
{
|
||||||
delete m_ode_object;
|
delete m_ode_object;
|
||||||
|
if (m_display_list_refcnt != NULL)
|
||||||
|
{
|
||||||
(*m_display_list_refcnt)--;
|
(*m_display_list_refcnt)--;
|
||||||
if (*m_display_list_refcnt < 1)
|
if (*m_display_list_refcnt < 1)
|
||||||
{
|
{
|
||||||
@ -672,6 +674,7 @@ Engine::Object::~Object()
|
|||||||
delete m_display_list_refcnt;
|
delete m_display_list_refcnt;
|
||||||
glDeleteLists(m_display_list, 1);
|
glDeleteLists(m_display_list, 1);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Engine::Object::createManagedObject()
|
void Engine::Object::createManagedObject()
|
||||||
|
12
ag.cc
12
ag.cc
@ -40,6 +40,18 @@ namespace ag
|
|||||||
{ "isKeyDown", isKeyDown },
|
{ "isKeyDown", isKeyDown },
|
||||||
{ "registerEventHandler", registerEventHandler },
|
{ "registerEventHandler", registerEventHandler },
|
||||||
{ "clearEventHandler", clearEventHandler },
|
{ "clearEventHandler", clearEventHandler },
|
||||||
|
|
||||||
|
{ "createBox", createBox},
|
||||||
|
{ "createStaticBox", createStaticBox},
|
||||||
|
{ "createSphere", createSphere},
|
||||||
|
{ "createStaticSphere", createStaticSphere},
|
||||||
|
{ "createPlane", createPlane},
|
||||||
|
{ "createStaticPlane", createStaticPlane},
|
||||||
|
{ "createCylinder", createCylinder},
|
||||||
|
{ "createStaticCylinder", createStaticCylinder},
|
||||||
|
{ "createCCylinder", createCCylinder},
|
||||||
|
{ "createStaticCCylinder", createStaticCCylinder},
|
||||||
|
|
||||||
{ NULL, NULL }
|
{ NULL, NULL }
|
||||||
};
|
};
|
||||||
luaL_register(L, "ag", functions);
|
luaL_register(L, "ag", functions);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user