From 71abe4aeca2366157ed0fdb76c37f394a1b1549b Mon Sep 17 00:00:00 2001 From: ejcoumans Date: Sun, 14 Oct 2007 00:18:49 +0000 Subject: [PATCH] reduced number of sphere in Basic demo, some system have slow rendering of spheres. removed another warning. --- Demos/BasicDemo/BasicDemo.cpp | 8 ++++---- Demos/CcdPhysicsDemo/CcdPhysicsDemo.cpp | 6 ++++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/Demos/BasicDemo/BasicDemo.cpp b/Demos/BasicDemo/BasicDemo.cpp index db4061180..7d228d129 100644 --- a/Demos/BasicDemo/BasicDemo.cpp +++ b/Demos/BasicDemo/BasicDemo.cpp @@ -24,10 +24,10 @@ subject to the following restrictions: #define START_POS_Z -3 -///create 1000 (10x10x10) dynamic objects -#define ARRAY_SIZE_X 10 -#define ARRAY_SIZE_Y 10 -#define ARRAY_SIZE_Z 10 +///create 125 (5x5x5) dynamic object +#define ARRAY_SIZE_X 5 +#define ARRAY_SIZE_Y 5 +#define ARRAY_SIZE_Z 5 //#define USE_SIMPLE_DYNAMICS_WORLD 1 diff --git a/Demos/CcdPhysicsDemo/CcdPhysicsDemo.cpp b/Demos/CcdPhysicsDemo/CcdPhysicsDemo.cpp index 4ef30d8b3..945dea748 100644 --- a/Demos/CcdPhysicsDemo/CcdPhysicsDemo.cpp +++ b/Demos/CcdPhysicsDemo/CcdPhysicsDemo.cpp @@ -160,7 +160,8 @@ void CcdPhysicsDemo::createStack( btCollisionShape* boxShape, float halfCubeSize trans.setOrigin(pos); btScalar mass = 1.f; - btRigidBody* body = localCreateRigidBody(mass,trans,boxShape); + btRigidBody* body = 0; + body = localCreateRigidBody(mass,trans,boxShape); } } } @@ -282,7 +283,8 @@ void CcdPhysicsDemo::clientMoveAndDisplay() if (m_idle) dt = 1.0/420.f; - int numSimSteps = m_dynamicsWorld->stepSimulation(dt,maxSimSubSteps); + int numSimSteps = 0; + numSimSteps = m_dynamicsWorld->stepSimulation(dt,maxSimSubSteps); /* if (!numSimSteps) printf("Interpolated transforms\n");