fix Mac OSX build
This commit is contained in:
@@ -1257,7 +1257,7 @@ btRigidBody* DemoApplication::localCreateRigidBody(float mass, const btTransform
|
|||||||
|
|
||||||
btRigidBody* body = new btRigidBody(mass,0,shape,localInertia);
|
btRigidBody* body = new btRigidBody(mass,0,shape,localInertia);
|
||||||
body->setWorldTransform(startTransform);
|
body->setWorldTransform(startTransform);
|
||||||
|
body->setContactProcessingThreshold(m_defaultContactProcessingThreshold);
|
||||||
m_dynamicsWorld->addRigidBody(body);
|
m_dynamicsWorld->addRigidBody(body);
|
||||||
|
|
||||||
return body;
|
return body;
|
||||||
|
|||||||
@@ -40,7 +40,13 @@ class DemoApplication
|
|||||||
protected:
|
protected:
|
||||||
|
|
||||||
btDynamicsWorld* m_dynamicsWorld;
|
btDynamicsWorld* m_dynamicsWorld;
|
||||||
|
btScalar m_defaultContactProcessingThreshold;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
DemoApplication()
|
||||||
|
:m_defaultContactProcessingThreshold(BT_LARGE_FLOAT)
|
||||||
|
{
|
||||||
|
}
|
||||||
virtual void myinit() {}
|
virtual void myinit() {}
|
||||||
virtual btDynamicsWorld* getDynamicsWorld()
|
virtual btDynamicsWorld* getDynamicsWorld()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -51,7 +51,9 @@ int main(int argc,char** argv)
|
|||||||
benchmarkDemo.initPhysics();
|
benchmarkDemo.initPhysics();
|
||||||
benchmarkDemo.getDynamicsWorld()->setDebugDrawer(&gDebugDrawer);
|
benchmarkDemo.getDynamicsWorld()->setDebugDrawer(&gDebugDrawer);
|
||||||
benchmarkDemo.setDebugMode(benchmarkDemo.getDebugMode() | btIDebugDraw::DBG_NoDeactivation);
|
benchmarkDemo.setDebugMode(benchmarkDemo.getDebugMode() | btIDebugDraw::DBG_NoDeactivation);
|
||||||
|
setDefaultContactProcessingThreshold(0.f);
|
||||||
return glutmain(argc, argv,640,480,"Bullet Physics Demo. http://bulletphysics.com",&benchmarkDemo);
|
return glutmain(argc, argv,640,480,"Bullet Physics Demo. http://bulletphysics.com",&benchmarkDemo);
|
||||||
|
|
||||||
#else //USE_GRAPHICAL_BENCHMARK
|
#else //USE_GRAPHICAL_BENCHMARK
|
||||||
int d;
|
int d;
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
@@ -260,4 +260,6 @@ static uint4 operator-(const uint4& a,const uint4& b)
|
|||||||
#define as_int(a) (*((int*)&(a)))
|
#define as_int(a) (*((int*)&(a)))
|
||||||
|
|
||||||
extern "C" int gMiniCLNumOutstandingTasks;
|
extern "C" int gMiniCLNumOutstandingTasks;
|
||||||
// extern "C" void __kernel_func(); \
|
// extern "C" void __kernel_func();
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ struct MiniCLKernelDesc
|
|||||||
MiniCLKernelDesc(void* pCode, char* pName);
|
MiniCLKernelDesc(void* pCode, char* pName);
|
||||||
};
|
};
|
||||||
|
|
||||||
#define MINICL_REGISTER(__kernel_func) static MiniCLKernelDesc __kernel_func##Desc(__kernel_func, #__kernel_func);
|
#define MINICL_REGISTER(__kernel_func) static MiniCLKernelDesc __kernel_func##Desc((void*)__kernel_func, #__kernel_func);
|
||||||
|
|
||||||
|
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
|
|||||||
Reference in New Issue
Block a user