Merged GLExtension deletion mechanism from master to avoid GLEXtension being deleted when shared contexts are used and osg::State is deleted when a context is deleted.
This commit is contained in:
parent
224f837e0d
commit
b37b635a7c
@ -139,8 +139,12 @@ State::~State()
|
||||
// delete the GLExtensions object associated with this osg::State.
|
||||
if (_glExtensions)
|
||||
{
|
||||
GLExtensions::Set(_contextID, 0);
|
||||
_glExtensions = 0;
|
||||
GLExtensions* glExtensions = GLExtensions::Get(_contextID, false);
|
||||
if (glExtensions && glExtensions->referenceCount() == 1) {
|
||||
// the only reference left to the extension is in the static map itself, so we clean it up now
|
||||
GLExtensions::Set(_contextID, 0);
|
||||
}
|
||||
}
|
||||
|
||||
//_texCoordArrayList.clear();
|
||||
|
Loading…
Reference in New Issue
Block a user