Based on feedback from another professional game company, there are several improvements, including some API change...
Some dynamic memory allocations have been replace by pool allocation or stack allocations. quantized aabb versus quantized aabb overlap check is made branch-free (helps a lot on consoles PS3/XBox 360) Collision algorithms are now created through a new btDefaultCollisionConfiguration, to decouple dependency (this is the API change): Example: btDefaultCollisionConfiguration* collisionConfiguration = new btDefaultCollisionConfiguration(); m_dispatcher = new btCollisionDispatcher(collisionConfiguration);
This commit is contained in:
@@ -95,6 +95,8 @@ void ConvexDecompositionDemo::initPhysics(const char* filename)
|
||||
tcount = wo.loadObj("../../file.obj");
|
||||
}
|
||||
|
||||
btDefaultCollisionConfiguration* collisionConfiguration = new btDefaultCollisionConfiguration();
|
||||
|
||||
#ifdef USE_PARALLEL_DISPATCHER
|
||||
#ifdef USE_WIN32_THREADING
|
||||
|
||||
@@ -112,9 +114,9 @@ void ConvexDecompositionDemo::initPhysics(const char* filename)
|
||||
///you can hook it up to your custom task scheduler by deriving from btThreadSupportInterface
|
||||
#endif
|
||||
|
||||
btCollisionDispatcher* dispatcher = new SpuGatheringCollisionDispatcher(threadSupport,maxNumOutstandingTasks);
|
||||
btCollisionDispatcher* dispatcher = new SpuGatheringCollisionDispatcher(threadSupport,maxNumOutstandingTasks,collisionConfiguration);
|
||||
#else
|
||||
btCollisionDispatcher* dispatcher = new btCollisionDispatcher();
|
||||
btCollisionDispatcher* dispatcher = new btCollisionDispatcher(collisionConfiguration);
|
||||
#endif//USE_PARALLEL_DISPATCHER
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user