New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BulletIntegration: btlDebugDraw implementation for Magnum. #11

Squareys opened this Issue Dec 29, 2015 · 3 comments


2 participants

Squareys commented Dec 29, 2015

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

@Squareys Squareys referenced this issue Sep 14, 2016


BulletIntegration: Usage #19

0 of 2 tasks complete

@mosra mosra added the improvement label Sep 14, 2016


This comment has been minimized.


mosra commented Sep 14, 2016

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 (mosra/magnum#148).


This comment has been minimized.


Squareys commented Sep 14, 2016

We need to implement these methods of that interface:

  • virtual void setDebugMode(int debugMode)=0
  • virtual int getDebugMode() const =0
  • virtual void drawLine(const btVector3 &from, const btVector3 &to, const btVector3 &color)=0
  • virtual void reportErrorWarning(const char *warningString)=0
  • virtual void draw3dText(const btVector3 &location, const char *textString)=0
  • virtual void flushLines()


  • virtual void drawLine(const btVector3& from,const btVector3& to, const btVector3& fromColor, const btVector3& toColor)

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.


This comment has been minimized.


mosra commented Oct 4, 2016

Implemented via #21.

@mosra mosra closed this Oct 4, 2016

@mosra mosra added this to the 2018.02 milestone Feb 15, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment