added 'Meshes' and 'Textures' sub-directories as Ogre resources location

actorid
Marc Zinnschlag 15 years ago
parent b7db6dcda3
commit 92bf5b4b6e

@ -45,6 +45,15 @@ void OMW::Engine::prepareMaster()
}
}
// add resources directory
// \note This function works recursively.
void OMW::Engine::addResourcesDirectory (const boost::filesystem::path& path)
{
mOgre.getRoot()->addResourceLocation (path.file_string(), "FileSystem",
Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME, true);
}
// Set data dir
void OMW::Engine::setDataDir (const boost::filesystem::path& dataDir)
@ -88,6 +97,9 @@ void OMW::Engine::go()
mOgre.configure(!isFile("ogre.cfg"), plugCfg, false);
addResourcesDirectory (mDataDir / "Meshes");
addResourcesDirectory (mDataDir / "Textures");
prepareMaster();
boost::filesystem::path masterPath (mDataDir);

@ -25,6 +25,10 @@ namespace OMW
/// adjust name and load bsa
void prepareMaster();
/// add resources directory
/// \note This function works recursively.
void addResourcesDirectory (const boost::filesystem::path& path);
public:
Engine();

Loading…
Cancel
Save