Added include/osg/GLObjects + .cpp which provide osg::flush*DeletedGLObjects() methods.

Added and cleaned up DeleteHandler calls in osgViewer to help avoid crashes on exit.

Changed DatabasePager across to dynamically checcking osg::getCompileContext(..)

Updated wrappers.
This commit is contained in:
Robert Osfield
2007-07-06 13:08:51 +00:00
parent a484b95d3c
commit 6931ae4878
13 changed files with 147 additions and 108 deletions

View File

@@ -567,6 +567,12 @@ Win32WindowingSystem::Win32WindowingSystem()
Win32WindowingSystem::~Win32WindowingSystem()
{
if (osg::Referenced::getDeleteHandler())
{
osg::Referenced::getDeleteHandler()->setNumFramesToRetainObjects(0);
osg::Referenced::getDeleteHandler()->flushAll();
}
unregisterWindowClasses();
}
@@ -2184,6 +2190,12 @@ struct RegisterWindowingSystemInterfaceProxy
~RegisterWindowingSystemInterfaceProxy()
{
if (osg::Referenced::getDeleteHandler())
{
osg::Referenced::getDeleteHandler()->setNumFramesToRetainObjects(0);
osg::Referenced::getDeleteHandler()->flushAll();
}
osg::GraphicsContext::setWindowingSystemInterface(0);
}
};