mirror of
https://github.com/bulletphysics/bullet3
synced 2024-12-13 13:20:07 +00:00
example browser: restore on-screen text
This commit is contained in:
parent
1deb3c1666
commit
f7ccf7e5a7
@ -774,13 +774,9 @@ void CommonRigidBodyMTBase::createDefaultParameters()
|
||||
}
|
||||
}
|
||||
|
||||
void CommonRigidBodyMTBase::physicsDebugDraw(int debugFlags)
|
||||
|
||||
void CommonRigidBodyMTBase::drawScreenText()
|
||||
{
|
||||
if (m_dynamicsWorld && m_dynamicsWorld->getDebugDrawer())
|
||||
{
|
||||
m_dynamicsWorld->getDebugDrawer()->setDebugMode(debugFlags);
|
||||
m_dynamicsWorld->debugDrawWorld();
|
||||
}
|
||||
char msg[ 1024 ];
|
||||
int xCoord = 400;
|
||||
int yCoord = 30;
|
||||
@ -866,3 +862,21 @@ void CommonRigidBodyMTBase::physicsDebugDraw(int debugFlags)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void CommonRigidBodyMTBase::physicsDebugDraw(int debugFlags)
|
||||
{
|
||||
if (m_dynamicsWorld && m_dynamicsWorld->getDebugDrawer())
|
||||
{
|
||||
m_dynamicsWorld->getDebugDrawer()->setDebugMode(debugFlags);
|
||||
m_dynamicsWorld->debugDrawWorld();
|
||||
}
|
||||
drawScreenText();
|
||||
}
|
||||
|
||||
|
||||
void CommonRigidBodyMTBase::renderScene()
|
||||
{
|
||||
m_guiHelper->syncPhysicsToGraphics(m_dynamicsWorld);
|
||||
m_guiHelper->render(m_dynamicsWorld);
|
||||
drawScreenText();
|
||||
}
|
||||
|
@ -52,6 +52,8 @@ struct CommonRigidBodyMTBase : public CommonExampleInterface
|
||||
}
|
||||
}
|
||||
|
||||
virtual void drawScreenText();
|
||||
virtual void renderScene();
|
||||
virtual void physicsDebugDraw(int debugFlags);
|
||||
|
||||
virtual void exitPhysics()
|
||||
@ -418,19 +420,7 @@ struct CommonRigidBodyMTBase : public CommonExampleInterface
|
||||
return body;
|
||||
}
|
||||
|
||||
|
||||
virtual void renderScene()
|
||||
{
|
||||
{
|
||||
|
||||
m_guiHelper->syncPhysicsToGraphics(m_dynamicsWorld);
|
||||
}
|
||||
|
||||
{
|
||||
|
||||
m_guiHelper->render(m_dynamicsWorld);
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
#endif //#define COMMON_RIGID_BODY_MT_BASE_H
|
||||
|
Loading…
Reference in New Issue
Block a user