Added GraphicsContext::ResizedCallback and GraphicsContext::resizedImplementation.

Added message on non implementation of GraphicsContext::valid().
Added prelimary GraphicsContext clean up support.
This commit is contained in:
Robert Osfield
2007-01-08 16:20:10 +00:00
parent a3726fba66
commit 4a5eda6522
8 changed files with 143 additions and 10 deletions

View File

@@ -44,7 +44,19 @@ Viewer::~Viewer()
_scene->setDatabasePager(0);
}
Contexts contexts;
getContexts(contexts);
// clear out all the previously assigned operations
for(Contexts::iterator citr = contexts.begin();
citr != contexts.end();
++citr)
{
(*citr)->close();
}
//osg::notify(osg::NOTICE)<<"finish Viewer::~Viewer()"<<std::endl;
}
bool Viewer::isRealized() const
@@ -858,6 +870,7 @@ void Viewer::renderingTraversals()
{
(*itr)->makeCurrent();
(*itr)->runOperations();
(*itr)->releaseContext();
}
}
@@ -876,6 +889,7 @@ void Viewer::renderingTraversals()
{
(*itr)->makeCurrent();
(*itr)->swapBuffers();
(*itr)->releaseContext();
}
}