[osg-users] Disabling HUD in one camera
I currently have a setup with one viewer with two cameras. I add a "HUD" to the scene (as a child to the root node) and it shows up in both camera views. Is there an easy way to disable seeing it in one view? Some camera->Set... that will do this? (based on depth or something?) Mike Greene ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Disabling HUD in one camera
Hello I currently have a setup with one viewer with two cameras. I add a "HUD" to the scene (as a child to the root node) and it shows up in both camera views. Is there an easy way to disable seeing it in one view? Some camera->Set... that will do this? (based on depth or something?) osg::Camera is a subclass of osg::Group, and the scene data is just a child of the camera. If you do camera->addChild(hudCamera);, then the HUD will only show up on that camera (since the HUD is not below the scene root, which is a child of all cameras). Hope this helps, J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Disabling HUD in one camera
Hi Mike, If you use a Camera in the scene graph then it'll appear once for each viewer Camera that encloses, unless you use traversal/node masks to cull it. The better solution is to do the HUD in a slave Camera within osgViewer::Viewer, or a separate View in a CompositeViewer, as then you can explictly bind the Camera to a particular GraphicsWindow. See the osghud example in 2.x. Robert. On Thu, Jun 12, 2008 at 8:44 PM, Mike Greene <[EMAIL PROTECTED]> wrote: > I currently have a setup with one viewer with two cameras. I add a "HUD" to > the scene (as a child to the root node) and it shows up in both camera > views. Is there an easy way to disable seeing it in one view? Some > camera->Set... that will do this? (based on depth or something?) > > > Mike Greene > > ___ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org