jwm wrote:
Erin Catto wrote:
I have no problem moving the debug drawing to be a manual call. Would this solve your problems?
Please, but to retain compatibility with existing code it may be better if Step() continued to call DrawDebugData() if it is set, but allow users to override the stored DebugDraw class by passing it as a parameter to DrawDebugData().
With this method there would be two ways to draw debug data: using the previous SetDebugData and Step method, or not calling SetDebugData and just calling DrawDebugData at the appropriate time.
This sounds like it would be a good solution. In the meantime I'm about to do the openGL display list thing which kdmiller suggested, but it would make sense for future versions of Box2D to allow the actual rendering to be done from somewhere outside of Step() if the user chooses to do that.