Added releaseGLObjects to NodeCallbacks, Drawable::DrawCallbacks and wired up

osgProducer to use it when doing cleanup_frame.
This commit is contained in:
Robert Osfield
2006-10-02 15:38:31 +00:00
parent 02783e1dfd
commit e0599f652e
12 changed files with 81 additions and 8 deletions

View File

@@ -104,6 +104,13 @@ public:
virtual void operator()( const Producer::Camera & camera);
void releaseGLObjects() const
{
{ for(TextList::const_iterator itr = _descriptionList.begin(); itr != _descriptionList.end(); ++itr) (*itr)->releaseGLObjects(); }
{ for(TextList::const_iterator itr = _optionList.begin(); itr != _optionList.end(); ++itr) (*itr)->releaseGLObjects(); }
{ for(TextList::const_iterator itr = _explanationList.begin(); itr != _explanationList.end(); ++itr) (*itr)->releaseGLObjects(); }
}
protected:
ViewerEventHandler* _veh;
@@ -1238,3 +1245,8 @@ void ViewerEventHandler::getUsage(osg::ApplicationUsage& usage) const
usage.addKeyboardMouseBinding("z","Start recording camera path.");
usage.addKeyboardMouseBinding("Z","If recording camera path stop recording camera path, save to \"saved_animation.path\"\nThen restart camera from beginning on animation path");
}
void ViewerEventHandler::releaseGLObjects(osg::State*) const
{
if (_statsAndHelpDrawCallback) _statsAndHelpDrawCallback->releaseGLObjects();
}