CompositeViewer support: Difference between revisions

Jump to navigation Jump to search
Line 118: Line 118:
* The right way to remove a view is outside of frame(). Not from an event handler from within the view, this will crash as you'll be deleting the object you are doing the work from.<ref>https://www.mail-archive.com/osg-users@lists.openscenegraph.org/msg35639.html</ref>
* The right way to remove a view is outside of frame(). Not from an event handler from within the view, this will crash as you'll be deleting the object you are doing the work from.<ref>https://www.mail-archive.com/osg-users@lists.openscenegraph.org/msg35639.html</ref>
* If you want to keep the view around for future use then perhaps the easiest way to do it would be to disable the View's camera by setting its NodeMask to 0x0 i.e. view->getCamera()->setNodeMask(0x0); <ref>https://www.mail-archive.com/osg-users@lists.openscenegraph.org/msg03518.html</ref>
* If you want to keep the view around for future use then perhaps the easiest way to do it would be to disable the View's camera by setting its NodeMask to 0x0 i.e. view->getCamera()->setNodeMask(0x0); <ref>https://www.mail-archive.com/osg-users@lists.openscenegraph.org/msg03518.html</ref>
In terms of closing a View, does this View have it's own
GraphicsWindow(s)?  If not then just setting the View's Camera's
NodeMask to 0 will switch if off and set it to 0xffffffff to switch it
back on again.  If the View does have it's own GraphicsWindow then
you'll need to close the window and switch off the rendering via the
NodeMask [...]
The other approach is to simply removing the View from the
CompositeView and add back in a new one when you need it.  The
NodeMask route is lightest weight route though and is what I'd do if
it's possible. <ref>https://www.mail-archive.com/osg-users@lists.openscenegraph.org/msg47608.html</ref>


=== DatabasePager ===  
=== DatabasePager ===  

Navigation menu