Hi Shadhidar,

On 10/19/07, Sashidhar Guntury <[EMAIL PROTECTED]> 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.

  view->getCamera()->setNodeMask(0x0);

Robert.
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to