[osg-users] Removing objects with shared GL state from scene graph
Robert Osfield
robert.osfield at gmail.com
Thu Aug 22 02:38:23 PDT 2019
Hi Chris,
On Wed, 21 Aug 2019 at 20:18, Chris Djali <krizdjali at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20190822/fb7ec59a/attachment.html>
More information about the osg-users
mailing list