Added more comprehensive releaseGLObjects(State*=0) throughout Nodes,
Drawables,StateSet, and osgDB::Registry. Added cleanup_frame() from to osgProducer::OsgCamerGroup to help with proper clean of OpenGL objects before exit, and modified osgviewer, osghangglider, osgwindows examples to do the extra frame call to cleanup_frame() before exit.
This commit is contained in:
@@ -214,3 +214,15 @@ void Geode::compileDrawables(State& state)
|
||||
(*itr)->compileGLObjects(state);
|
||||
}
|
||||
}
|
||||
|
||||
void Geode::releaseGLObjects(osg::State* state) const
|
||||
{
|
||||
Node::releaseGLObjects(state);
|
||||
|
||||
for(DrawableList::const_iterator itr=_drawables.begin();
|
||||
itr!=_drawables.end();
|
||||
++itr)
|
||||
{
|
||||
(*itr)->releaseGLObjects(state);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user