Fixed issues that prevent Linux version to compile. Thanks to Enrico for reporting and patch, see
http://www.bulletphysics.com/Bullet/phpBB3/viewtopic.php?f=9&t=1747
This commit is contained in:
@@ -29,7 +29,7 @@
|
|||||||
#include "GLDebugDrawer.h"
|
#include "GLDebugDrawer.h"
|
||||||
|
|
||||||
static GLDebugDrawer gDebugDrawer;
|
static GLDebugDrawer gDebugDrawer;
|
||||||
#include "LinearMath/btQuickProf.h"
|
#include "LinearMath/btQuickprof.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -320,8 +320,12 @@ float myFrictionModel( btRigidBody& body1, btRigidBody& body2, btManifoldPoint&
|
|||||||
|
|
||||||
void CcdPhysicsDemo::initPhysics()
|
void CcdPhysicsDemo::initPhysics()
|
||||||
{
|
{
|
||||||
|
#ifdef USE_PARALLEL_DISPATCHER
|
||||||
|
#ifdef WIN32
|
||||||
m_threadSupportSolver = 0;
|
m_threadSupportSolver = 0;
|
||||||
m_threadSupportCollision = 0;
|
m_threadSupportCollision = 0;
|
||||||
|
#endif //
|
||||||
|
#endif
|
||||||
|
|
||||||
//#define USE_GROUND_PLANE 1
|
//#define USE_GROUND_PLANE 1
|
||||||
#ifdef USE_GROUND_PLANE
|
#ifdef USE_GROUND_PLANE
|
||||||
@@ -650,11 +654,14 @@ void CcdPhysicsDemo::exitPhysics()
|
|||||||
|
|
||||||
//delete solver
|
//delete solver
|
||||||
delete m_solver;
|
delete m_solver;
|
||||||
|
#ifdef USE_PARALLEL_DISPATCHER
|
||||||
|
#ifdef WIN32
|
||||||
if (m_threadSupportSolver)
|
if (m_threadSupportSolver)
|
||||||
{
|
{
|
||||||
delete m_threadSupportSolver;
|
delete m_threadSupportSolver;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
//delete broadphase
|
//delete broadphase
|
||||||
delete m_broadphase;
|
delete m_broadphase;
|
||||||
@@ -662,10 +669,14 @@ void CcdPhysicsDemo::exitPhysics()
|
|||||||
//delete dispatcher
|
//delete dispatcher
|
||||||
delete m_dispatcher;
|
delete m_dispatcher;
|
||||||
|
|
||||||
|
#ifdef USE_PARALLEL_DISPATCHER
|
||||||
|
#ifdef WIN32
|
||||||
if (m_threadSupportCollision)
|
if (m_threadSupportCollision)
|
||||||
{
|
{
|
||||||
delete m_threadSupportCollision;
|
delete m_threadSupportCollision;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
delete m_collisionConfiguration;
|
delete m_collisionConfiguration;
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ class btCollisionDispatcher;
|
|||||||
class btConstraintSolver;
|
class btConstraintSolver;
|
||||||
struct btCollisionAlgorithmCreateFunc;
|
struct btCollisionAlgorithmCreateFunc;
|
||||||
class btDefaultCollisionConfiguration;
|
class btDefaultCollisionConfiguration;
|
||||||
class Win32ThreadSupport;
|
|
||||||
|
|
||||||
///CcdPhysicsDemo shows basic stacking using Bullet physics, and allows toggle of Ccd (using key '1')
|
///CcdPhysicsDemo shows basic stacking using Bullet physics, and allows toggle of Ccd (using key '1')
|
||||||
class CcdPhysicsDemo : public DemoApplication
|
class CcdPhysicsDemo : public DemoApplication
|
||||||
@@ -38,9 +38,12 @@ class CcdPhysicsDemo : public DemoApplication
|
|||||||
|
|
||||||
btCollisionDispatcher* m_dispatcher;
|
btCollisionDispatcher* m_dispatcher;
|
||||||
|
|
||||||
Win32ThreadSupport* m_threadSupportCollision;
|
#ifdef USE_PARALLEL_DISPATCHER
|
||||||
|
#ifdef WIN32
|
||||||
Win32ThreadSupport* m_threadSupportSolver;
|
class Win32ThreadSupport* m_threadSupportCollision;
|
||||||
|
class Win32ThreadSupport* m_threadSupportSolver;
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
btConstraintSolver* m_solver;
|
btConstraintSolver* m_solver;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user