Hi Andy, On Thu, Sep 2, 2010 at 1:17 PM, Andy Skinner <[email protected]> wrote: > JOGL has an interface with init(), display(), displayChanged(), and > reshape(). It doesn't have a method for when the context is being destroyed. > You can do something on the removeNotify() for the component, but we've seen > some cases where the context is remade without prior notice (it had to do > with resizing GLJPanel, which has a PBuffer inside it). That just makes me > concerned that I can't guarantee to catch a context going away before it does.
That's awkward then... nice of JOGL to provide all the functionality you need minus a few important bits. One way around might be to use the osg::Node::releaseGLObjects() call on the viewers scene graph and then osg::discardAllGLObjects() to flush all the buffers that cache the deleted OpenGL objects. Do this prior to destructing the viewer and it shouldn't hopefully not have any OpenGL calls to do on destruction of the viewer. Robert. _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

