Hello,
Is there a way to set Bullet's debug drawer to only draw certain meshes? I have a terrain object that uses a height field collision shape, but the mesh is very fine, so the drawer ends up drawing millions of triangles and then lags my entire application. I only want the drawer to draw my small rigid bodies that are moving around a lot. I tried doing a search but I couldn't find anything useful.
Any assistance would be appreciated.
Thanks,
Gavin
DebugDrawer, only draw certain meshes?
-
- Posts: 456
- Joined: Tue Dec 25, 2007 1:06 pm
Re: DebugDrawer, only draw certain meshes?
You may try:GavinL wrote:I have a terrain object that uses a height field collision shape, but the mesh is very fine, so the drawer ends up drawing millions of triangles and then lags my entire application.
Code: Select all
terrainBody->setCollisionFlags(terrainBody->getCollisionFlags()|CF_DISABLE_VISUALIZE_OBJECT); // Disable debug drawing
-
- Posts: 5
- Joined: Fri Oct 14, 2011 11:23 pm
Re: DebugDrawer, only draw certain meshes?
Ah thanks
works like a charm!

-
- Posts: 65
- Joined: Fri May 13, 2011 1:11 pm
Re: DebugDrawer, only draw certain meshes?
alternatively, if you are bothered by the normals but want to keep the wireframe try the 1st patch in:
http://code.google.com/p/bullet/issues/ ... 9&sort=-id
/selfpromotion ;P
edit: the 3rd patch also shows bounding boxes for child-shapes in compound shapes, neat for both debugging and debug-drawing
http://code.google.com/p/bullet/issues/ ... 9&sort=-id
/selfpromotion ;P
edit: the 3rd patch also shows bounding boxes for child-shapes in compound shapes, neat for both debugging and debug-drawing
