Hi Nick,
is there a way to have a node to be only reflected but not rendered? I
have tryied to set up the node mask to just
ocean->getOceanScene()->getReflectedSceneMask()
but the node still gets rendered
This has nothing to do with osgOcean... If you want your node to not be
rendered you need to set up the viewer's cull visitor to have a
traversal mask different than 0xFFFFFFFF (which means render anything
with a non-zero node mask). So in your case you could use say
0xFFFFFFFF & ~ocean->getOceanScene()->getReflectedSceneMask()
which is all bits except the reflected scene mask.
You can get the viewer's cull visitor this way:
osgViewer::Renderer* renderer =
dynamic_cast<osgViewer::Renderer*>(viewer->getCamera()->getRenderer());
renderer->getSceneView(0)->getCullVisitor();
(or if you're using CompositeViewer, get each view's camera and then...)
(also do it for SceneView 1 - the SceneViews are double-buffered in
multithreaded viewers, better be safe).
Hope this helps,
J-S
--
______________________________________________________
Jean-Sebastien Guay jean-sebastien.g...@cm-labs.com
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