diff --git a/Demos/AllBulletDemos/Main.cpp b/Demos/AllBulletDemos/Main.cpp index 378b1cd79..2dc3742af 100644 --- a/Demos/AllBulletDemos/Main.cpp +++ b/Demos/AllBulletDemos/Main.cpp @@ -29,7 +29,7 @@ #include "GLDebugDrawer.h" static GLDebugDrawer gDebugDrawer; -#include "LinearMath/btQuickProf.h" +#include "LinearMath/btQuickprof.h" diff --git a/Demos/CcdPhysicsDemo/CcdPhysicsDemo.cpp b/Demos/CcdPhysicsDemo/CcdPhysicsDemo.cpp index 5e16df134..8e4be2012 100644 --- a/Demos/CcdPhysicsDemo/CcdPhysicsDemo.cpp +++ b/Demos/CcdPhysicsDemo/CcdPhysicsDemo.cpp @@ -320,8 +320,12 @@ float myFrictionModel( btRigidBody& body1, btRigidBody& body2, btManifoldPoint& void CcdPhysicsDemo::initPhysics() { +#ifdef USE_PARALLEL_DISPATCHER +#ifdef WIN32 m_threadSupportSolver = 0; m_threadSupportCollision = 0; +#endif // +#endif //#define USE_GROUND_PLANE 1 #ifdef USE_GROUND_PLANE @@ -650,11 +654,14 @@ void CcdPhysicsDemo::exitPhysics() //delete solver delete m_solver; - +#ifdef USE_PARALLEL_DISPATCHER +#ifdef WIN32 if (m_threadSupportSolver) { delete m_threadSupportSolver; } +#endif +#endif //delete broadphase delete m_broadphase; @@ -662,10 +669,14 @@ void CcdPhysicsDemo::exitPhysics() //delete dispatcher delete m_dispatcher; +#ifdef USE_PARALLEL_DISPATCHER +#ifdef WIN32 if (m_threadSupportCollision) { delete m_threadSupportCollision; } +#endif +#endif delete m_collisionConfiguration; diff --git a/Demos/CcdPhysicsDemo/CcdPhysicsDemo.h b/Demos/CcdPhysicsDemo/CcdPhysicsDemo.h index 128e558e6..f90121081 100644 --- a/Demos/CcdPhysicsDemo/CcdPhysicsDemo.h +++ b/Demos/CcdPhysicsDemo/CcdPhysicsDemo.h @@ -25,7 +25,7 @@ class btCollisionDispatcher; class btConstraintSolver; struct btCollisionAlgorithmCreateFunc; class btDefaultCollisionConfiguration; -class Win32ThreadSupport; + ///CcdPhysicsDemo shows basic stacking using Bullet physics, and allows toggle of Ccd (using key '1') class CcdPhysicsDemo : public DemoApplication @@ -38,9 +38,12 @@ class CcdPhysicsDemo : public DemoApplication btCollisionDispatcher* m_dispatcher; - Win32ThreadSupport* m_threadSupportCollision; - - Win32ThreadSupport* m_threadSupportSolver; +#ifdef USE_PARALLEL_DISPATCHER +#ifdef WIN32 + class Win32ThreadSupport* m_threadSupportCollision; + class Win32ThreadSupport* m_threadSupportSolver; +#endif +#endif btConstraintSolver* m_solver;