re-create debug drawer after 'resetSimulation', also avoid memory leak after doing so.
this fixes wireframe. Also use <CTRL>+hotkey, to avoid conflicts with user-specified keyboard functions.
This commit is contained in:
@@ -338,6 +338,12 @@ void OpenGLGuiHelper::render(const btDiscreteDynamicsWorld* rbWorld)
|
||||
void OpenGLGuiHelper::createPhysicsDebugDrawer(btDiscreteDynamicsWorld* rbWorld)
|
||||
{
|
||||
btAssert(rbWorld);
|
||||
if (m_data->m_debugDraw)
|
||||
{
|
||||
delete m_data->m_debugDraw;
|
||||
m_data->m_debugDraw = 0;
|
||||
}
|
||||
|
||||
m_data->m_debugDraw = new MyDebugDrawer(m_data->m_glApp);
|
||||
rbWorld->setDebugDrawer(m_data->m_debugDraw );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user