This week I have been working on a new threading model for the OSG,
one that allows the update, cull traversals to work in a parallel with
the draw traversal.  This has meant a few changes to the core osg,
osgUtil and osgViewer, but most of these are now complete - complete
enough for me to get some first benchmarking results...

I have a small and larger town models and both are coming in at tad
over 50% faster with the new threading model.  This is for a dual core
CPU, on a single screen, with vsync off.

I still have more work to do so that multiple cull traversals can run
in parallel as well as cull overlapping draw.  Once I've done this
things should scale nicely across multiple graphics cards as well.
Although... memory bandwidth will start being holding things back, at
least on my humble dual gfx card, dual core system.

For those who are curious, the trick behind this change is two use two
SceneView's per camera, and have the cull traversal fill in one
SceneView, while the draw traversal reads from the other.  The draw
traversal is also split into two logic sections - the rendering of non
const parts of the scene graph, and the rendering of const parts.  Due
to the fact the OSG scene graph isn't generally multibuffered like
Performer one can't overlapping updating the scene graph and reading
from it, but if you aren't changing the scene graph you can safely
overlap it, with some tidy results :-)

For those who are curious about testing this out, update from CVS and
run osgviewer on your models then press 'm' to toggle the threading
model, it'll toggle from the default ThreadPerContext to
ThreadPerCamera (the new one) and down to SingleThreaded.

Consider these changes highly experimental so if it crashes and burns,
just warm you hands on the glowing embers of your machine :-)

Robert.
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to