Ricardo Ruiz wrote:
Thanks.
Just one question, OSG renders at the maximun amount of FPS it can, but ODE
requires a fixed time step. How do you solve this problem? Thanks a lot.
Is there a reason you're not synced to vertical swap? If you were to
enable that, then OSG would render at the refresh rate of the monitor
(unless you have a huge rendering load). Assuming you use the monitor
refresh rate as the ODE simulation interval, then the two sample rates
would match. End of problem.
I'm not sure my Bullet work will help here, as Bullet doesn't require a
fixed time interval. You just pass an arbitrary elapsed time interval to
stepSimulation and Bullet produces sim results accordingly.
osgBullet (at http://osgbullet.googlecode.com) includes a mechanism to
share transform data between separate rendering and physics threads,
allowing both to run at whichever rate they choose (not to mention take
advantage of multicore systems). So if you can't find any way for ODE
and OSG to use the same sample rate, then a mechanism like this might help.
I seem to recall someone making some changes to osgViewer a while back
to control the frame rate. I didn't really follow that change or
discussion. Maybe just looking at the source code would be revealing.
-Paul
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org