Hi Ronald,

On 8/7/07, ronaldss <[EMAIL PROTECTED]> wrote:
> It has some example of the use of osg::Operation and osg::OperationQueue?

The osg::GraphicsThread usage in osgViewer uses the above, albeit in
somewhat a different way to what you'll require.

The osgterrain example also has code for creating new subgraphs in a
background threads and use custom osg::Operation, osg::OperationQueue
and osg::OperationThread to implement the multi-threaded usage, and
includes sync'ing with the main subgraph.  There is a section in the
MasterOperation::operator() method that places Operations into an
OperationQueue then empties this operation queue itself.   Although
this is a far more complicated example that you essentially need it
might give you a bit of inspriration.

I also wonder about perhaps adding an OperationQueue into
osgViewer::Viewer/CompositeViewer to add support for doing update
operations automatically as part of the Viewer::updateTraversal()
method.  Then you'd just need to do something like
viewer->getUpdateOperationQueue()->add(myOperation);

I do need to add that OperationQueue in the above form is pretty new
so only available in SVN and the 2.1.4 dev release.

Robert.
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to