>
I want to display the simulation in real time when drawing the screen with drawstuff.
What does it mean "in real time" in your context?
Keep in mind that the drawStuff related projects are conveniences to validate that the physics engine works as expected. They're not really there to show how to create a real-time simulation tied to graphics.
If you do want to match the rendering to the simulation, you might want to check the `simLoop (int pause)` functions, and put some kind of timer there: at the beginning of the function, store the time, and at the end of the function, check how long it took to process the physics and the rendering. Then either Sleep or busy-loop until the time it took matches the time specified to the `dWorldQuickStep` or `dWorldStep` functions. That's probably not perfect, but that's the first thing I'd try.