From Jannik Heller , GL object deletion fix.

"This submission changes deleteGLObject calls to scheduleGLObjectForDeletion, to ensure that the actual deletion happens from the correct thread (the graphics thread). This fixes the leak I reported in http://forum.openscenegraph.org/viewtopic.php?t=15567 , and possibly also http://forum.openscenegraph.org/viewtopic.php?t=15564."
This commit is contained in:
Robert Osfield
2016-02-05 20:29:22 +00:00
parent 8cefa05e3a
commit 3e0435febd
5 changed files with 12 additions and 12 deletions

View File

@@ -689,7 +689,7 @@ Program::PerContextProgram::~PerContextProgram()
{
if (_ownsProgramHandle)
{
osg::get<GLProgramManager>(_contextID)->deleteGLObject(_glProgramHandle);
osg::get<GLProgramManager>(_contextID)->scheduleGLObjectForDeletion(_glProgramHandle);
}
}