[ODE] Is a variable frame rate possible?
Vrej Melkonian
vmelkon at yahoo.com
Tue Dec 6 07:10:43 MST 2005
--- Bram Stolk <bram at sara.nl> wrote:
> What I do, is the following:
>
> Measure the elapsed time since last display
> iteration.
> Based on this dt, determine a nr of simulation
> iterations
> to do. E.g. on a very slow MESA renderer, where it
> takes
> a second to render, I do a LOT of ode iterations.
> On a high end graphics card, dt is very low, so I do
> just one ODE iteration for each display iteration.
> In code, it looks like this:
>
If you run more loops because your renderer is slow
(software renderer like MESA), doesn't this mean ODE
will slow down everything even more, which means more
iterations for ODE.
I think you should not measure the time it takes to
execute ODE.
What does everyone else think?
This is a problem I have had myself so I decided to
run ODE in a separate thread, but this seems to slow
down the system on a single CPU. Whether I run ODE in
a thread that doesn't sleep or sleeps a little at a
time, it still runs slower than single threaded version.
__________________________________________
Yahoo! DSL Something to write home about.
Just $16.99/mo. or less.
dsl.yahoo.com
More information about the ODE
mailing list