[osg-users] Performance Problems

Paul Martz pmartz at skew-matrix.com
Sat Oct 20 11:52:37 PDT 2007

30fps sounds like you have vsync enabled. If you ever hope to get more FPS
than the monitor refresh rate, you'll have to disable that.
Are you using OSG's built-in class for FPS display? If so, turn on the stats
graph and see where it's spending its time: update, cull, or draw.
If you dump a static frame of your scene out to an .osg file and display it
in osgviewer, what kind of framerate do you get?
What kind of framerate do you get for "osgviewer cow.osg" on the same

From: osg-users-bounces at lists.openscenegraph.org
[mailto:osg-users-bounces at lists.openscenegraph.org] On Behalf Of Shawn Cook
Sent: Friday, October 19, 2007 4:32 PM
To: osg-users at lists.openscenegraph.org
Subject: [osg-users] Performance Problems

Hi, Trying to do something simple and getting a poor framerate.  I'm sure
it's just something I don't know about OSG and need to learn, perhaps you
folks can help.  Basically, imagine a camera positioned above a grid with
anywhere from 100 to 5000 quads of similar size shuffling around on the 2D
plane with the grid.  The position of each of these quads is controlled in
real time by a seperate Java app via multicast.
My coworker is working on an identical project in parallel to mine on an
identical laptop but is using Cocoa(Mac OS X 10.5) and straight OpenGL.  He
is getting a framerate of 100+ frames per second with 500 quads while I
cannot get more than 30fps with 500.  That framerate is acceptable, but
eventually I would like to do more than just draw quads.  Instead, each quad
will be a little "tail" of quads following a "head" around - like tracers or
a little snake.  Again, my coworker has done this already and is acheiving a
similarly phenominal framerate - If I add just a couple quads my framerate
drops.  What's the deal?  At first I was using a single geode, geometry
object and vec3array for each quad and was getting an unusable framerate.
When I restructured with a single geode, geometry for the application and
one large vec3array for all the quads my framerate got up to where it is now
(acceptable, but slow when I add the tracers).
How can I acheive 100+ fps like my friend?
System info:
MacBook Pro 1,1
Windows XP (using Bootcamp)
2GHz Dual Core
OpenSceneGraph 2.0.0
VRJuggler 2.0.3-1
Also, this is a VRJuggler/OpenSceneGraph application - perhaps if you guys
can't help I'll hit up the VRJuggler mailing lists for some help.
Thanks folks,


Help yourself to FREE treats served up daily at the Messenger Café. Stop by

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20071020/bd41ddea/attachment-0003.htm>

More information about the osg-users mailing list