Hi Robert, thank you for the explanation.
My use case is actually installing new nodes into the scene graph (dynamically generated ImageStreams playing videos as needed). I will be using update operations, but not necessarily using separate threads for these. Although it would be interesting to see if the video decoding could be shifted entirely to a separate thread - if the FFMPEG plugin doesn't already do that). Christian 2014-09-25 18:01 GMT+02:00 Robert Osfield <[email protected]>: > Hi Christian, > > On 25 September 2014 16:35, Christian Buchner <[email protected] > > wrote: > >> when looking at the osgViewerBase class I noticed a feature where the >> user can install "update operations" that get executed once per frame. >> addUpdateOperation() is the function I am talking about. >> >> I was wondering if this method of updating the scene graph has any >> advantages over the classic methods of installing update callbacks, or >> updating things during the update traversal. >> >> The only two OSG examples making use of this feature are the osgtext >> example and the osgthreadedterrain examples. Internally within OSG the >> function isn't used anywhere, it seems. >> > > The osg::OperationQueue that manages the update operations is a thread > safe container that allows you to pass Operations from other threads to the > viewer so that viewer can call then during the update traversal. Merging > data built by a background thread is a good example of how one might use > this facility. > > You can potentially do something similar with an update callback but it'd > need to manage the thread safety etc. > > As conceptual note, scene graph Callbacks are really to do with the scene > itself, such as animating an object, rather than viewer level operations. > > Robert. > > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > >
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

