Robert Osfield wrote:

Hi Eron,

On 4/23/07, Eron Steger <[EMAIL PROTECTED]> wrote:

It appears that nodes added under a slave camera using 'addSlave' do not
have their update callbacks called.  Is this intended, and if so, how
would one go about updating these objects, short of adding them to
master camera's scene graph.


Usually the slaves will share the same subgraph as the View's master
camera, and by default the Viewer will enforce this, so calling the
update traversal is only required for the main scene graph.

How is it enforced? I noticed it by default uses the master camera's scene data, but if seems like it's intended to be changed.

I presume you are doing something similiar to the osgdistortion
example is doing have using slave cameras that are detected from the
main scene for some specific effect.  In this case it does look like
call update traversal on the scene would be useful.
osgViewer::Viewer's update traversal will need to be modified to check
for this condition and call the update traversal on the cameras that
are different.

The code I've got is based off the osghud example with the '--Viewer' parameter, which may be similar.

The other alternative would be to use CompositeViewer for your app, as
it might be more appropriate, each View can have its own scene graph.

Perhaps. Is CompositeViewer the preferred way of doing something like this? Right now I'm using the main Viewer class since most of the examples are based on this (probably because they were using osgProducer before).

- Eron


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

Reply via email to