made demos working for realtime
This commit is contained in:
@@ -188,7 +188,10 @@ void ColladaDemo::clientMoveAndDisplay()
|
|||||||
{
|
{
|
||||||
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
||||||
|
|
||||||
m_dynamicsWorld->stepSimulation(deltaTime);
|
float dt = m_clock.getTimeMilliseconds() * 0.001f;
|
||||||
|
m_clock.reset();
|
||||||
|
|
||||||
|
m_dynamicsWorld->stepSimulation(dt);
|
||||||
|
|
||||||
renderme();
|
renderme();
|
||||||
|
|
||||||
|
|||||||
@@ -95,9 +95,11 @@ void ConstraintDemo::clientMoveAndDisplay()
|
|||||||
|
|
||||||
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
||||||
|
|
||||||
float deltaTime = 1.f/60.f;
|
float dt = m_clock.getTimeMilliseconds() * 0.001f;
|
||||||
|
m_clock.reset();
|
||||||
|
|
||||||
m_dynamicsWorld->stepSimulation(deltaTime);
|
|
||||||
|
m_dynamicsWorld->stepSimulation(dt);
|
||||||
renderme();
|
renderme();
|
||||||
|
|
||||||
glFlush();
|
glFlush();
|
||||||
|
|||||||
@@ -295,8 +295,10 @@ void ConvexDecompositionDemo::clientMoveAndDisplay()
|
|||||||
{
|
{
|
||||||
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
||||||
|
|
||||||
|
float dt = m_clock.getTimeMilliseconds() * 0.001f;
|
||||||
|
m_clock.reset();
|
||||||
|
|
||||||
m_dynamicsWorld->stepSimulation(deltaTime);
|
m_dynamicsWorld->stepSimulation(dt);
|
||||||
|
|
||||||
renderme();
|
renderme();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user