X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=simgear%2Fscene%2Ftgdb%2Fuserdata.cxx;h=2482f033d9d25dc781824770ad8456b6aa7b53fc;hb=2a2be51b8fda4ca2595203c07ce625ddaa68012c;hp=10fa8f7e7763d5cee644bf670b641325fc8e65db;hpb=593c884f144ff593d46c031d5bb5d46abab545c6;p=simgear.git diff --git a/simgear/scene/tgdb/userdata.cxx b/simgear/scene/tgdb/userdata.cxx index 10fa8f7e..2482f033 100644 --- a/simgear/scene/tgdb/userdata.cxx +++ b/simgear/scene/tgdb/userdata.cxx @@ -32,10 +32,12 @@ #include #include #include +#include -#include "SGModelBin.hxx" #include "userdata.hxx" #include "SGReaderWriterBTG.hxx" +#include "ReaderWriterSPT.hxx" +#include "ReaderWriterSTG.hxx" // the following are static values needed by the runtime object // loader. However, the loading is done via a call back so these @@ -52,17 +54,21 @@ static SGPropertyNode *root_props = NULL; // none of the other object files in this library would be included in // the executable! Sticking the static proxy here forces the BTG code // to be sucked in. +namespace { osgDB::RegisterReaderWriterProxy g_readerWriter_BTG_Proxy; +osgDB::RegisterReaderWriterProxy g_readerWriterSTGProxy; +simgear::ModelRegistryCallbackProxy g_stgCallbackProxy("stg"); + +osgDB::RegisterReaderWriterProxy g_readerWriterSPTProxy; +simgear::ModelRegistryCallbackProxy g_sptCallbackProxy("spt"); +} + void sgUserDataInit( SGPropertyNode *p ) { _inited = true; root_props = p; } -osg::Node* sgGetRandomModel(SGMatModel *obj, mt *seed) { - return obj->get_random_model( root_props, seed ); - } - namespace simgear { SGPropertyNode* getPropertyRoot()