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:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user