Hi Chris,

On Sun, 30 Jun 2019 at 00:52, Chris Djali <krizdj...@gmail.com> wrote:

> The high-level behaviour is all fine as-is. The specific problem is that
> it's not safe to call osgText::Text::releaseGLObjects when removing a text
> object as that releases GL objects for the font, too, and that can still be
> in use by other text nodes.
>

It should be safe to call Text/Font::releaseGLObjects(state) with the
deletion of GraphicsContext that the state associated with that
GraphiscContext, that's the intention, if that isn't working and the high
level functionality is working correctly then this is a bug.

I've just done a quick review of the code and master and 3.6 branch do
mostly seem to be doing what they should in the
Text/Font::releaseGLObjects().  There is one area that does look like it
might be missing some releaseGLObjects() calls is in the handling of
Glyph3D objects.

However, in your example where you were playing games with globals to
prevent destruction, this remains the wrong way to implement viewers and is
not supported by the relaseGLObjects() scheme, for reasons I've outlined in
my replies above.

Robert.
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to