Added State::releaseGLObjects() and ShaderComposer::releaseGLObjects() to avoid problems with cleanup of graphics context
This commit is contained in:
@@ -546,6 +546,10 @@ void GraphicsContext::close(bool callCloseImplementation)
|
||||
}
|
||||
}
|
||||
|
||||
if (_state.valid())
|
||||
{
|
||||
_state->releaseGLObjects();
|
||||
}
|
||||
|
||||
if (callCloseImplementation && _state.valid() && isRealized())
|
||||
{
|
||||
@@ -569,8 +573,6 @@ void GraphicsContext::close(bool callCloseImplementation)
|
||||
osg::flushAllDeletedGLObjects(_state->getContextID());
|
||||
}
|
||||
|
||||
_state->reset();
|
||||
|
||||
releaseContext();
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user