[osg-users] Removing objects with shared GL state from scene graph

Martin Siggel martinsiggel+osg at gmail.com
Fri Jul 26 03:41:08 PDT 2019

Hi Robert,

I had a custom camera manipulator, which was derived from orbitmanipulator.

I experienced the issue in my Android app. I assigned this manipulator to
the osgviewer and kept a reference outside of the viewer. My idea was to
keep the current state of orbit animation and position when going back to
the app.

However, this prevented cleaning up all the GL objects from the current
context, even though I deleted the viewer. After removing the reference to
the manipulator, everything worked as expected.

Therefore, I suppose that there has to be some reference to the camera in
the manipulator.

I could provide an example but it will be an Android example. Is there
something you could use?


Robert Osfield <robert.osfield at gmail.com> schrieb am Fr., 26. Juli 2019,

> Hi Martin,
> On Fri, 26 Jul 2019 at 11:12, Martin Siggel <martinsiggel+osg at gmail.com>
> wrote:
>> Yes, it's the standard manipulator. I am not sure though, if it keeps a
>> direct reference or an indirect reference (via other nodes) to the camera.
>> Still I noticed, if I keep a reference to the camera manipulator my
>> viewer is not cleaned up correctly.
> I'm afraid I'm not able to parse the above.  Do you have a ref_ptr<> to
> the camera manipulator in your application outside of the View/Viewer
> handle to it?  What CameraManipulator are you using?
> Could you create a small example to illustrate this usage case?  I've been
> reviewingan testing all the CompositeViewer/View and associated examples
> today but haven't yet come across an example of usage case they is causing
> the problems.
> Robert.
> Robert.
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20190726/0a571326/attachment.html>

More information about the osg-users mailing list