So, I'm trying to setup a simple debug drawer. I've implemented my debug drawer, but upon debugging it looks like Bullet isn't even getting to my custom debug drawer. It looks like Bullet doesn't even know that I have something that needs drawing. It seems I have no actions, which means I have nothing to draw. I don't see how this is the case when I clearly have activity based on text output.
First, I initialize my drawer, and pass it to setDebugDrawer().
Code: Select all
debugDrawer.setDebugMode(btIDebugDraw::DBG_DrawWireframe);
dynamicsWorld->setDebugDrawer(&debugDrawer);
Then each game loop I run my simulation, and tell bullet to draw using its debug drawer.
Code: Select all
while(gameIsRunning())
{
dynamicsWorld->stepSimulation(1.f/60.f,10);
dynamicsWorld->debugDrawWorld();
}
With this, I stepped through my program and it does get into debugDrawWorld(). It get's into a loop going through a list of actions. For some reason, I have no actions even though I clearly have things happening based on text output. the loop I'm referring to is in
btDiscreteDynamicsWorld.cpp
Code: Select all
if (getDebugDrawer() && (getDebugDrawer()->getDebugMode() & (btIDebugDraw::DBG_DrawWireframe | btIDebugDraw::DBG_DrawAabb | btIDebugDraw::DBG_DrawNormals)))
{
int i;
if (getDebugDrawer() && getDebugDrawer()->getDebugMode())
{
for (i=0;i<m_actions.size();i++)
{
m_actions[i]->debugDraw(m_debugDrawer);
}
}
}
Does anyone have any idea why bullet would not be attempting to draw any of my objects?