made demos working for realtime

This commit is contained in:
ejcoumans committed 2006-10-18 04:32:00 +00:00
1 parent 33b3ec94f1
commit 940e753086
3 files changed
+11 -4

No files matched your search

+4 -1
View File
@@ -188,7 +188,10 @@ void ColladaDemo::clientMoveAndDisplay()
{
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();
+4 -2
View File
@@ -95,9 +95,11 @@ void ConstraintDemo::clientMoveAndDisplay()
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();
glFlush();
@@ -295,8 +295,10 @@ void ConvexDecompositionDemo::clientMoveAndDisplay()
{
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();