Hi Robert, 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. robertosfield wrote: > Hi Phillipe. > > When a graphics context is detroyed a releaseGLObjects() on the scene > graph should be called. When a context is destroyed outwith the > control of the core OSG then calling > osg::discardAllGLObjects(contextID) should be done to make sure any > cached GL objects handles and discarded for that context. > > The osgViewer library tries to do this all for you, but if you've > implement your own context setup/destruction then it won't have all > the control to do this automatically. > > Robert. > > On 10 May 2015 at 13:12, philippe renon <> wrote: > > > Hi, > > > > I am using osg 3.2.1 in a Qt application. Sometimes, for reasons too long to > > explain here, Qt will destroy the OpenGL context used by a scene. After that > > I see rendering problems and logs has warnings similar to this one: > > > > DBG: [OSG NOTICE] > > WRN: [OSG WARN] Warning: detected OpenGL error 'invalid enumerant' at After > > Renderer::compile > > WRN: [OSG WARN] > > > > The rendering issues are caused by missing textures. The geometry looks fine > > though. > > > > Is there a way to force a complete scene to rebind its textures or do I need > > to destroy and rebuild the scene? > > > > Philippe. > > > > _______________________________________________ > > osg-users mailing list > > > > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > > > > _______________________________________________ > osg-users mailing list > > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > ------------------ > Post generated by Mail2Forum ------------------ Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=63687#63687 _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

