planB
27-05-2010 12:32:58
hi, everyone!
i'm new here, and i found that can not load mygui resouce from resources.cfg.
i have add the mygui resource folder in ogre's media/mygui, and add this code to resources.cfg
in ogre the locateresource cede is below,
but when i run the app, i cannot see the mygui button and so on.(ogre itself is ok) in the log, show that
surely the core.xml is in the media/mygui folder
i'm new here, and i found that can not load mygui resouce from resources.cfg.
i have add the mygui resource folder in ogre's media/mygui, and add this code to resources.cfg
FileSystem=../../media/mygui
in ogre the locateresource cede is below,
void BaseApplication::setupResources(void)
{
// Load resource paths from config file
Ogre::ConfigFile cf;
cf.load(mResourcesCfg);
// Go through all sections & settings in the file
Ogre::ConfigFile::SectionIterator seci = cf.getSectionIterator();
Ogre::String secName, typeName, archName;
while (seci.hasMoreElements())
{
secName = seci.peekNextKey();
Ogre::ConfigFile::SettingsMultiMap *settings = seci.getNext();
Ogre::ConfigFile::SettingsMultiMap::iterator i;
for (i = settings->begin(); i != settings->end(); ++i)
{
typeName = i->first;
archName = i->second;
Ogre::ResourceGroupManager::getSingleton().addResourceLocation(
archName, typeName, secName);
}
}
}
but when i run the app, i cannot see the mygui button and so on.(ogre itself is ok) in the log, show that
Core | Error | ResourceManager : 'core.xml', not found
surely the core.xml is in the media/mygui folder