[osg-users] Different views hide/show different nodes shared scene graph

Robert Osfield robert.osfield at gmail.com
Thu Apr 18 03:27:11 PDT 2019


Hi Catalin,

On Thu, 18 Apr 2019 at 11:07, Catalin Flower <inbox.icf at gmail.com> wrote:
> To hide the objects in views I found this solution:
>
> getViewer()->getUpdateVisitor()->setTraversalMask(0b101); // skip update for hidden objects
> getViewer()->getCamera()->setCullMask(0b101); // cull objects that are hidden
>
> This is the solutions that I found for the views. Is this the way to do it?

For multiple views the way to do it with the OSG is to use the
osgViewer::CompositeViewer class, and then each osgViewer::View you
set up the approrpiate Camera's CullMask.

Robert.


More information about the osg-users mailing list