Get rid of btSolverBody and use btRigidBody directly. btSolverBody didn't improve performance after all, due to random-access
Tweak the BenchmarkDemo a bit: 1) disable deactivation in graphical mode 2) add some settings that increase performance in the BenchmarkDemo2 (1000 stack) from 35ms to 15ms on this quad core (at the cost of a bit of quality)
This commit is contained in:
@@ -82,7 +82,8 @@ m_singleStep(false),
|
||||
m_idle(false),
|
||||
|
||||
m_enableshadows(false),
|
||||
m_sundirection(btVector3(1,-2,1)*1000)
|
||||
m_sundirection(btVector3(1,-2,1)*1000),
|
||||
m_defaultContactProcessingThreshold(BT_LARGE_FLOAT)
|
||||
{
|
||||
#ifndef BT_NO_PROFILE
|
||||
m_profileIterator = CProfileManager::Get_Iterator();
|
||||
@@ -935,6 +936,7 @@ btRigidBody* DemoApplication::localCreateRigidBody(float mass, const btTransform
|
||||
btRigidBody::btRigidBodyConstructionInfo cInfo(mass,myMotionState,shape,localInertia);
|
||||
|
||||
btRigidBody* body = new btRigidBody(cInfo);
|
||||
body->setContactProcessingThreshold(m_defaultContactProcessingThreshold);
|
||||
|
||||
#else
|
||||
btRigidBody* body = new btRigidBody(mass,0,shape,localInertia);
|
||||
|
||||
@@ -94,6 +94,7 @@ protected:
|
||||
GL_ShapeDrawer* m_shapeDrawer;
|
||||
bool m_enableshadows;
|
||||
btVector3 m_sundirection;
|
||||
btScalar m_defaultContactProcessingThreshold;
|
||||
|
||||
public:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user