diff --git a/components/resource/scenemanager.cpp b/components/resource/scenemanager.cpp index 6f38c41c4a..efaccec133 100644 --- a/components/resource/scenemanager.cpp +++ b/components/resource/scenemanager.cpp @@ -104,8 +104,7 @@ namespace Resource // TODO: add support for non-NIF formats - NifOsg::Loader loader; - osg::ref_ptr loaded = loader.load(Nif::NIFFilePtr(new Nif::NIFFile(file, normalized)), mTextureManager); + osg::ref_ptr loaded = NifOsg::Loader::load(Nif::NIFFilePtr(new Nif::NIFFile(file, normalized)), mTextureManager); osgDB::Registry::instance()->getOrCreateSharedStateManager()->share(loaded.get()); // TODO: run SharedStateManager::prune on unload @@ -144,9 +143,8 @@ namespace Resource { Files::IStreamPtr file = mVFS->get(normalized); - NifOsg::Loader loader; osg::ref_ptr loaded (new NifOsg::KeyframeHolder); - loader.loadKf(Nif::NIFFilePtr(new Nif::NIFFile(file, normalized)), *loaded.get()); + NifOsg::Loader::loadKf(Nif::NIFFilePtr(new Nif::NIFFile(file, normalized)), *loaded.get()); mKeyframeIndex[normalized] = loaded; return loaded;