[ODE] ODE in its own thread

Jeroen Schmitz Jeroen Schmitz" <ode at q12.org
Fri Jul 18 03:03:01 2003


Frederic Ferland <fref@videotron.ca> wrote:
> Anyway, I was just wondering if anyone has tried implementing physics
> using multi-threading and if so, how did you implement it in order to
> obtain a performance boost from it.  Is this worth the trouble or
> should I just stick to the simple way of doing things? :)

I have tried several ways to use ODE, including running it in a separate
thread and rendering in another thread. While I didn't get any noticable
performance improvement the main disadvantage I encountered is that is
virtually impossible to exactly synchronize the timesteps of the physics
calculations and the frames of the rendering thread, which is an
absolute necessity if you want smooth movements when running full screen
with vsync enabled. So I steered away from the multiple thread idea and
just calculate the physics in the main application thread.

Jeroen