[ODE] dt computation

Bram Stolk bram at sara.nl
Sat Apr 1 05:47:29 MST 2006


Hello,


Some of my platforms do not sync on vertical retraces when doing
glXSwapBuffers.

This means, that 'dt' between iterations is *much* smaller, e.g. 1ms.
This causes the ode/test progs to simulate *way* too fast.
(Most ode tests use a 0.05 fixed dt! which is off by a factor 50 in
this case: argh....)

The proper way is of course to determine dt.

I did this for the newly created test_basket in the svn trunk.

Currently, the dt calculation works for UNIX, and uses sys/time and
gettimeofday. I've adapted configure.in for this.

For platforms that do not support gettimeofday (win32 maybe?), it uses
a constant dt, where I assume 60fps.

What I would like to do:

1) Move the dt-computation to drawstuff
2) Have someone implement a variant for platforms without gettimeofday
3) Change all ode/test progs to use the drawstuff dt func

   Bram


More information about the ODE mailing list