Note: Before I start I presume there will be requests to go to 2.1 understandably, for now, I want to stick to 2.0.
I was wondering what the fastest method of getting the vertices into the ManualObject every frame would be when using Bullet's Debug drawer, I have a 24456 triangled model and without the ManualObject (that holds all of the vertices in Bullet's world) being enabled, it runs at perfectly well, however enabling the drawing of Bullet's collision world and as the image shows, I get 4 fps which is terrible.
Note: I do draw Normals, Wireframe and Constraints, but even disabling all but Wireframe does not really provide any noticable performance gains.
As i understand it, when you call debugDrawWorld it feeds all of the vertices into the drawLine function (in my case), I have inherited the btIDebugDraw in our Collision Renderer class, so that's all fine. To start with I call:
Code: Select all
m_lines->begin(Ogre::RenderOperation::OT_LINE_LIST);
m_lines->position(btVector3(0,0,0));
m_lines->end();
Code: Select all
void CollisionRenderer::drawLine(const btVector3 &from, const btVector3 &to, const btVector3 &color)
{
m_lines->position(from);
m_lines->position(to);
}
In terms of the direction to go, is it wise to look deeper into deriving my own class from MovableObject, but then is there something in particular that is bloating the ManualObject class or is it something on my end? I am happy to post more code, any help would be really appreciated.
Thanks