Added an InitRegistry static intiialization and destrucion static to help control the order of construction and destruction of the osgDB::Registry.

git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14461 16af8721-9629-0410-8352-f15c8da7e697
This commit is contained in:
Robert Osfield
2014-11-04 11:18:42 +00:00
parent 28a676e105
commit aa962724e8

View File

@@ -25,6 +25,8 @@
#include <osg/TexMat>
#include <osg/DeleteHandler>
#include <osgDB/Registry>
#include <osgUtil/Optimizer>
#include <osgUtil/IntersectionVisitor>
#include <osgUtil/Statistics>
@@ -38,6 +40,23 @@ static osg::ApplicationUsageProxy ViewerBase_e5(osg::ApplicationUsage::ENVIRONME
using namespace osgViewer;
struct InitRegistry
{
InitRegistry()
{
osgDB::Registry::instance();
}
~InitRegistry()
{
osgDB::DatabasePager::prototype() = 0;
osgDB::Registry::instance(true);
}
};
static InitRegistry s_InitRegistry;
ViewerBase::ViewerBase():
osg::Object(true)
{