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:
Robert Osfield 2005-11-09 20:26:34 +00:00
parent 26c911acf3
commit 2bd868cd1c

View File

@ -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();