X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModel%2Fmodelmgr.cxx;h=2b547cf027486a0cfcefbad6f69f98329ada551c;hb=552c3149aeaaea7abdc00eee644ef81414644e7b;hp=4d19b7be16ca61bd4d9bf2b5c49e2b755ae9723b;hpb=50461db267991a183c30914cc1273212eda453e6;p=flightgear.git diff --git a/src/Model/modelmgr.cxx b/src/Model/modelmgr.cxx index 4d19b7be1..2b547cf02 100644 --- a/src/Model/modelmgr.cxx +++ b/src/Model/modelmgr.cxx @@ -25,12 +25,13 @@ #include "modelmgr.hxx" -SG_USING_STD(vector); +using std::vector; + +using namespace simgear; // OSGFIXME // extern SGShadowVolume *shadows; - FGModelMgr::FGModelMgr () : _models(fgGetNode("/models", true)), _listener(new Listener(this)) @@ -68,17 +69,12 @@ FGModelMgr::add_model (SGPropertyNode * node) SGModelPlacement *model = new SGModelPlacement; instance->model = model; instance->node = node; - SGModelLib *model_lib = globals->get_model_lib(); const char *path = node->getStringValue("path", "Models/Geometry/glider.ac"); osg::Node *object; try { - object = model_lib->load_model( - globals->get_fg_root(), - path, - globals->get_props(), - globals->get_sim_time_sec(), /*cache_object=*/false); + object = SGModelLib::loadPagedModel(path, globals->get_props()); } catch (const sg_throwable& t) { SG_LOG(SG_GENERAL, SG_ALERT, "Error loading " << path << ":\n " << t.getFormattedMessage() << t.getOrigin());