Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 23, 2009, 7:44:49 PM (15 years ago)
Author:
rgrieder
Message:

Simplified our resource system a bit by working with a single resource group on the user end.
However you can still declare resource groups for separate loading. But accessing the files will always look in all groups.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation2/src/libraries/core/GraphicsManager.cc

    r6394 r6404  
    100100
    101101        // At first, add the root paths of the data directories as resource locations
    102         Ogre::ResourceGroupManager::getSingleton().addResourceLocation(PathConfig::getDataPathString(), "FileSystem", "dataRoot", false);
     102        Ogre::ResourceGroupManager::getSingleton().addResourceLocation(PathConfig::getDataPathString(), "FileSystem");
    103103        // Load resources
    104         resources_.reset(new XMLFile("resources.oxr", "dataRoot"));
     104        resources_.reset(new XMLFile("DefaultResources.oxr"));
    105105        resources_->setLuaSupport(false);
    106106        Loader::open(resources_.get());
     
    109109        if (PathConfig::isDevelopmentRun())
    110110        {
    111             Ogre::ResourceGroupManager::getSingleton().addResourceLocation(PathConfig::getExternalDataPathString(), "FileSystem", "externalDataRoot", false);
    112             extResources_.reset(new XMLFile("resources.oxr", "externalDataRoot"));
     111            Ogre::ResourceGroupManager::getSingleton().addResourceLocation(PathConfig::getExternalDataPathString(), "FileSystem");
     112            extResources_.reset(new XMLFile("resources.oxr"));
    113113            extResources_->setLuaSupport(false);
    114114            Loader::open(extResources_.get());
     
    395395    {
    396396        int orxonoxLevel;
    397         switch (lml)
    398         {
    399         case Ogre::LML_TRIVIAL:
    400             orxonoxLevel = this->ogreLogLevelTrivial_;
    401             break;
    402         case Ogre::LML_NORMAL:
    403             orxonoxLevel = this->ogreLogLevelNormal_;
    404             break;
    405         case Ogre::LML_CRITICAL:
    406             orxonoxLevel = this->ogreLogLevelCritical_;
    407             break;
    408         default:
    409             orxonoxLevel = 0;
     397        std::string introduction;
     398        // Do not show caught OGRE exceptions in front
     399        if (message.find("OGRE_EXCEPTION"))
     400        {
     401            orxonoxLevel = OutputLevel::Debug;
     402            introduction = "Ogre, caught exception: ";
     403        }
     404        else
     405        {
     406            switch (lml)
     407            {
     408            case Ogre::LML_TRIVIAL:
     409                orxonoxLevel = this->ogreLogLevelTrivial_;
     410                break;
     411            case Ogre::LML_NORMAL:
     412                orxonoxLevel = this->ogreLogLevelNormal_;
     413                break;
     414            case Ogre::LML_CRITICAL:
     415                orxonoxLevel = this->ogreLogLevelCritical_;
     416                break;
     417            default:
     418                orxonoxLevel = 0;
     419            }
     420            introduction = "Ogre: ";
    410421        }
    411422        OutputHandler::getOutStream(orxonoxLevel)
    412             << "Ogre: " << message << std::endl;
     423            << introduction << message << std::endl;
    413424    }
    414425
Note: See TracChangeset for help on using the changeset viewer.