Hi Chris,

On Wed, 21 Aug 2019 at 20:18, Chris Djali <krizdj...@gmail.com> wrote:

> Is the plan still to have OSG itself release GL objects in the object
> cache when the contexts they're associated with are destroyed, and if so,
> have you had any further thoughts about how this might be accomplished?
>
> The problem is still that there's nothing in osgViewer that has the same
> lifetime as an osg::GraphicsContext, and osg isn't supposed to be aware of
> osgDB, so it has to be osgViewer that releases things, right?
>

I have already added a
osgDB::Registry::instance()->releaseGLObjects(state); to the
osgViewer::Renader::releaseGLObjects():


void Renderer::releaseGLObjects(osg::State* state) const
{
    osgDB::Registry::instance()->releaseGLObjects(state);

    if (_sceneView[0].valid()) _sceneView[0]->releaseGLObjects(state);
    if (_sceneView[1].valid()) _sceneView[1]->releaseGLObjects(state);
}

This is in master and the 3.6 branch.  This should clear the ObjectCache.
It's why I added this.

I can't keep running around in circles on this.  I've put in a lot of
effort to try and resolve what I can, but now I need to get on with other
work.

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

Reply via email to