Add a new flag btCollisionObject::CF_DISABLE_VISUALIZE_OBJECT to give control over what objects are drawn using the debug drawer

This solves Issue 238 , thanks to  Linzner for the suggestion
Remove some warnings from GL_DialogDynamicsWorld.
This commit is contained in:
erwin.coumans
2010-01-20 19:38:04 +00:00
parent ae6c59848f
commit 099c36a71e
4 changed files with 62 additions and 55 deletions

View File

@@ -1109,11 +1109,14 @@ void DemoApplication::renderscene(int pass)
// m_dynamicsWorld->getDebugDrawer()->drawAabb(aabbMin,aabbMax,btVector3(1,1,1));
switch(pass)
if (!(getDebugMode()& btIDebugDraw::DBG_DrawWireframe))
{
case 0: m_shapeDrawer->drawOpenGL(m,colObj->getCollisionShape(),wireColor,getDebugMode(),aabbMin,aabbMax);break;
case 1: m_shapeDrawer->drawShadow(m,m_sundirection*rot,colObj->getCollisionShape(),aabbMin,aabbMax);break;
case 2: m_shapeDrawer->drawOpenGL(m,colObj->getCollisionShape(),wireColor*btScalar(0.3),0,aabbMin,aabbMax);break;
switch(pass)
{
case 0: m_shapeDrawer->drawOpenGL(m,colObj->getCollisionShape(),wireColor,getDebugMode(),aabbMin,aabbMax);break;
case 1: m_shapeDrawer->drawShadow(m,m_sundirection*rot,colObj->getCollisionShape(),aabbMin,aabbMax);break;
case 2: m_shapeDrawer->drawOpenGL(m,colObj->getCollisionShape(),wireColor*btScalar(0.3),0,aabbMin,aabbMax);break;
}
}
}
}