Robert, You are right. That's how I originally implemented it (by only setting the traversalMode to TRAVERSE_NONE for slaves that use masters scene graph). The reason I changed it was to make the behaviour consistent for both cases (the scene is traversed before the camera). For the updateTraversal however I believe it's necessary to traverse the slaves children (aka "the scene") before passing the updateVisitor to the camera in order to ensure the camera has access to an updated "scene" for the current frame.
Please feel free to modify the submission as you see fit or let me know if you want a resubmission with any changes. Filip > I've just reviewed your changes and left wondering whether it wouldn't > just be OK to call the camera->accept(_eventVisitor) on each slave > that doesn't share the master's scene graph. Is there a reason why > you call accept(..) on each of the slave's children instead of the > slave camera directly? > > Robert. > > On Wed, Nov 3, 2010 at 8:20 AM, Filip Holm <[email protected]> wrote: > > Hi Robert, > > > > Sorry if I'm double posting my submission. I just realized that all the > > other submissions had the [osg-submission] prefix in the subject field > and > > since I didn't get any response I was thinking this might be requirement > > (Although it's not listed on the Submissions Protocol list). I appreciate > > the fact that you are busy and this is by no means meant to rush > > things. I just want to make sure I did things right, since this is my > first > > submission . > > Motivation for change: > > I ran into a problem where updateCallback was not called for slave camera > > that didn't use mastersSceneData.(Se example > > SlaveCameraForUniformCallback.cpp) > > After some digging I found that this is because the event- and > updateVisitor > > only traverses the masterSceneData and does not handle slaves with their > own > > "scene". > > > > Changes made: > > I did a minor change to Viewer and CompositeViewer to get the subgraph > > traversal to work for slaves with their own "scene". > > > > Testing carried out: > > See attached example. (Also tested against several cases in own product) > > > > Changes are made against revision: 11844 > > Filip > > > > > > > > _______________________________________________ > > osg-submissions mailing list > > [email protected] > > > http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org > > > > > _______________________________________________ > osg-submissions mailing list > [email protected] > > http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org >
_______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
