HI Yefei,

On 4/13/07, Yefei He <[EMAIL PROTECTED]> wrote:
    Thanks. I was able to get the effect I want when I combine the examples
of osghud and osgcamera (with the one window and multiple cameras setting).
There will be quite a lot of work that I need to do to migrate from
osgProducer and producer::camera to the new osgviewer and camera, but there
should be a lot of benefits. However, I have one concern. My current code
allows me to add or remove a view in the window on the fly. How do I achieve
that now? Are the views all set once Viewer::realize() is called?

osgViewer is much more flexible than osgProducer at handling adding
and removal of cameras, simple call viewer.stopThreading(), modify the
viewer, call viewer.setUpRenderingSupport(), then restart the
threading with viewer.startThreading().

I did
notice that in the osgshadowtexture example, some cameras are added in the
scenegraph, rather than being added as slave to the viewer. Is that the way
to go to achieve runtime view creation and deletion?

Adding Camera's to the scene graph is another option, there are
advantages and disadvantages of this.  If the effect is part of the
scene then I'd say but the Camera in the scene graph, if the effect is
part of the viewer then put it in the viewer.  Note you now have
CompositeViewer for handling multiple views on to one or more scene
graphs, see the osghud example in SVN.

Robert.

Robert.
_______________________________________________
osg-users mailing list
[EMAIL PROTECTED]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to