Hi Philippe,

On 10 May 2015 at 22:24, Philippe Renon <[email protected]> wrote:
> As a matter of fact I have a GraphicsContext managed by osg.
> And it properly gets destroyed.
>
> I later create a new View and set on it the scene data that was previously 
> set on the other view (which is now discarded).
> I then see the errors below and get crashes.
> Please note that this does not happen on simple scenes but on scenes 
> containing osgearth maps.
>
> There is something I am not doing properly when destorying the 1s view which 
> leaves the scene in a bad state. Question is to find what is wrong with the 
> scene.

Is there any chance your application is caching a subgraph that isn't
attached to the view/contexts that are destroyed so are effectively
hidden by the releaseGLObjects() operation?   If you re-attach such a
subgraph to a new context it's handles to GL objects will all still be
there but won't be valid.

If you do cache subgraphs in this way then you need to call
rootnode->releaseGLObjects(); on it prior to deleting the context, or
call releaseGLObjectse() afterwards then osg::discardAllGLObjects();

Robert.
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to