[osg-users] Different views hide/show different nodes
Catalin Flower
inbox.icf at gmail.com
Wed Apr 17 02:56:13 PDT 2019
Hi,
I have an old application using OpengGL and I am porting it to OSG.
I have one scene graph shared by multiple views. The problem is some views have some objects hidden.
My solution:
I have used osg::Drawable::CullCallback to hide some objects by implementing
virtual bool cull(osg::NodeVisitor* nv, osg::Drawable* drawable, osg::RenderInfo* renderInfo) const;
It works great. Is this the canonical way to hide objects with a share scene graph in multiple views?
My next problem is picking objects. How do I pick objects in shared scene graph in multiple views when I use CullCallback to hide some objects(nodes) ? How can I make the picker behave like the rendering which used CullCallback ?
Thank you!
Cheers,
Catalin
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=75853#75853
More information about the osg-users
mailing list