Added release and flush of OpenGL objects after build of the terrain database to prevent
the build graphics context state leaking into the viewers graphics context set.
This commit is contained in:
parent
26c911acf3
commit
2bd868cd1c
@ -96,6 +96,12 @@ osg::Node* createEarth()
|
||||
else dataSet->writeDestination();
|
||||
|
||||
scene = dataSet->getDestinationRootNode();
|
||||
|
||||
// now we must get rid of all the old OpenGL objects before we start using the scene graph again
|
||||
// otherwise it'll end up in an inconsistent state.
|
||||
scene->releaseGLObjects(dataSet->getState());
|
||||
osg::Texture::flushAllDeletedTextureObjects(0);
|
||||
osg::Drawable::flushAllDeletedDisplayLists(0);
|
||||
}
|
||||
|
||||
return scene.release();
|
||||
|
Loading…
Reference in New Issue
Block a user