Take a look a osgDB::DatabasePager, which does essentially the same thing.
Data (loaded in a separate thread) is stored in a list that is shared by the
viewer class. Once a frame, the viewer lets the DatabasePager update the
scene graph from this list.
 
Paul Martz
Skew Matrix Software LLC
http://www.skew-matrix.com <http://www.skew-matrix.com/> 
+1 303 859 9466
 

  _____  

From: [email protected]
[mailto:[email protected]] On Behalf Of Alfonso
Callejo Goena
Sent: Friday, May 22, 2009 4:29 AM
To: [email protected]
Subject: [osg-users] Running viewer loop and physic calculations indifferent
threads


Hello everyone:
 
I'm developing a OSG-based graphic engine for a real time mechanical
simulator. I would like that the physics and the graphic display would run
in separate threads so that they could work independently without bothering
each other. The communication between them is a kind of buffer or list to
which the physics program pushes the last calculation and the graphic
program pulls the appropriate one.
I don't know which is the best (and most simple) way of setting up and
managing the threads. Does the osgViewer class have a way of doing this?
Where can I find an example which follows this technique?
 
Thank you,
Alfonso
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to