[osg-users] Making the composite window disappear
robert.osfield at gmail.com
Fri Oct 19 05:54:27 PDT 2007
On 10/19/07, Sashidhar Guntury <sashidhar.moony at gmail.com> wrote:
> Oops, I forgot to mention that I'm not removing (i.e deleting)
> view variable. I actually tried that but since the destructor is protected,
> it would not work.
To delete just set all the ref_ptr<View> to 0 and it'll delete.
I suspect the reason why the removed View's cameras are still visiable
is that the view hasn't been deleted, and the cameras still have the
graphics window attached so are still being renderer by the graphics
window on each frame.
If you didn't hold a global to the View then it'd delete automatically
when you removed the View from the CompositeViewer and its associated
Camera would be deleted along with it, removing itself completely from
being associated with the GraphicsWindow.
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.
More information about the osg-users