mosra / magnum-integration

Integration libraries for the Magnum C++11 graphics engine
https://magnum.graphics/
Other
99 stars 44 forks source link

BulletIntegration: btlDebugDraw implementation for Magnum. #11

Closed Squareys closed 8 years ago

Squareys commented 8 years ago

Hello everybody!

While working with Bullet for a bit, I found this btlDebugDraw class/interface which is supposed to be dervied with implementations for simple primitive drawing methods. It can then be attached to a btCollisionWorld or btDynamicsWorld for example, to provide fast and simple means of debug rendering.

I suggest this could be a great thing to have in the BulletIntegration library, since its code would most likely be common for all Magnum apps which use bullet.

(This is in no way urgent and if I have time, I might event implement this myself later next year. Just wanted to put that out there for discussion.)

Greetings, Squareys

mosra commented 8 years ago

Hah, sorry, this somehow completely slipped through my attention...

Now I think this would be a much better approach than having those "shape converters", considering I'm about to deprecate/remove the half-assedimplemented shapes library (https://github.com/mosra/magnum/issues/148).

Squareys commented 8 years ago

We need to implement these methods of that interface:

Optionally:

Everything else is already implemented using the drawLine() method. I suggest building a buffer with all the lines and then drawing that on flushLines(). That buffer needs to be updated every frame, so that's not optimal, but it's only for debug rendering anyway.

mosra commented 8 years ago

Implemented via #21.