Thanks Robert.

Here is my scenario:

Load a viewer
Load a model
do something
Unload the model
Unload the viewer

and this all over again. On the second try, I am getting: Warning: detected
OPenGL error 'invalid enumerant' at after RenderBin::draw(...) .... what can
cause this?


Nick

http://www.linkedin.com/in/tnikolov
Sent from Devlet, Ankara, Turkey

On Wed, Dec 2, 2009 at 5:19 AM, Robert Osfield <[email protected]>wrote:

> Hi Nick,
>
> For normal OSG usage you shouldn't need to worry about explicitly
> trying to call releaseGLObjects().  The only case where this might be
> needed is you detact a scene graph from viewer then destroy the
> viewer, but retain the scene graph so it doesn't get cleaned, but then
> you go an apply that scene graph to a new viewer.   If you do such a
> releaseGLOObjects() after the context has been destructed then you
> should call osg::discardAllGLObjects(contextID) to discard any GL
> object handles that are cached for that context.
>
> Robert.
>
> On Wed, Dec 2, 2009 at 1:03 PM, Trajce Nikolov <[email protected]>
> wrote:
> > Hi,
> > I am trying to clean up everything, release all gl objects, textures ..
> etc.
> > I found osg::Node::releaseGLObjects,
> osg::Texture::deleteAllTextureObjects
> > and I wrote visitors so before recreating new scenegraph I am calling it.
> > Still have issues with missing textures though. It works when you
> > dynamically create/destroy viewers but looks like it should be called in
> > some "proper time" - can not do that so my intension is to
> programatically
> > clean and release about everything. will setSceneData(0) reset just about
> > everything?
> > Nick
> >
> > http://www.linkedin.com/in/tnikolov
> >
> > _______________________________________________
> > 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
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to