Hi Paul, I'm not really sure the framerate would suffer. Actually this is what I do in my engine (I use ODE). There is absolutely no problem running 3 physics steps and then one display step. Of course this would depend on the complexity of the scene! Anyway, as explained in another post, I created a main loop that takes care of the "framerate" for each part (physics, display) and that fire off steps when necessary (without changing OSG code). Anyway, threading would of course be better...
Sukender PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/ Le Thu, 15 Jan 2009 00:18:19 +0100, Paul Martz <[email protected]> a écrit: >> Well, is it possible to run "n times PUT", and then one time the >> standard frame (update/cull/draw)? If so, there should be no >> problem. > > It's possible to do it that way, but the display frame rate will suffer if > the physics computation gets expensive. In my own work, I am stepping the > physics simulation once, then calling osgViewer::Viewer::frame(), and I'm > already seeing framerate issues when interactions get complex. If you want > to step the physics simulation multiple times, it'll be even more of an > issue. I think putting the physics simulation in a separate thread will make > this less of a problem. > > It's also simpler, because it doesn't require osgPhysics to invade > osgViewer, which I personally think is a bad idea. OSG has a lot of > mechanisms that allow you to do physics without modifying the OSG code. I'm > able to do a full Bullet physics simulation in my project, and haven't > modified one line of OSG (just derived a few classes). > > Paul Martz > Skew Matrix Software LLC > http://www.skew-matrix.com > +1 303 859 9466 > > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

