[osg-users] OSG Performance Issues

Paul Martz pmartz at skew-matrix.com
Sat Oct 27 12:53:11 PDT 2007



I know for a fact that this loop in particular is using all the time because
1. This is the OSG main loop
and is the only thing running (it's single threaded) and 2. If I comment it
out my frame rate goes down to 
jack-diddly. The value of test_load_resolution is only 55. 

I think you're misunderstanding my question. It's entirely possible that the
SLOW CODE isn't taking very much time at all to execute, but the mere act of
altering the geometric data is causing OSG to run slower. Removing SLOW CODE
would cause OSG to run faster. Because the value of test_load_resolution is
only moderate, I suspect this is the case.
By default, OSG compiles your geometric data into display lists. This is a
fairly expensive operation, but great for static geometry because it only
needs to be done once. However, if you change the data every frame, you
cause OSG to recompile the display list each frame. That's a guaranteed
performance killer.
Call setUseDisplayList( false ) on your Drawable and see if that helps your
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20071027/ac1186de/attachment-0003.htm>

More information about the osg-users mailing list