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 <[email protected]> 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
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to