Changeset 1052 for code/trunk/src/orxonox/GraphicsEngine.cc
- Timestamp:
- Apr 14, 2008, 3:42:49 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/orxonox/GraphicsEngine.cc
r1042 r1052 42 42 43 43 #include "core/CoreIncludes.h" 44 #include "core/ConfigValueIncludes.h" 44 45 #include "core/Debug.h" 45 46 46 47 47 48 namespace orxonox { 48 49 using namespace Ogre;50 49 51 50 /** … … 96 95 this->renderWindow_ = 0; 97 96 // delete the ogre log and the logManager (since we have created it). 98 if ( LogManager::getSingletonPtr() != 0)99 { 100 LogManager::getSingleton().getDefaultLog()->removeListener(this);101 LogManager::getSingleton().destroyLog(LogManager::getSingleton().getDefaultLog());102 delete LogManager::getSingletonPtr();97 if (Ogre::LogManager::getSingletonPtr() != 0) 98 { 99 Ogre::LogManager::getSingleton().getDefaultLog()->removeListener(this); 100 Ogre::LogManager::getSingleton().destroyLog(Ogre::LogManager::getSingleton().getDefaultLog()); 101 delete Ogre::LogManager::getSingletonPtr(); 103 102 } 104 103 COUT(4) << "*** GraphicsEngine: Destroying objects done" << std::endl; … … 121 120 //TODO: Check if file exists (maybe not here) 122 121 /*#ifndef OGRE_STATIC_LIB 123 root_ = new Root(configPath_ + "plugins.cfg", configPath_ + "ogre.cfg",122 root_ = new Ogre::Root(configPath_ + "plugins.cfg", configPath_ + "ogre.cfg", 124 123 configPath_ + "Ogre.log"); 125 124 #else 126 root_ = new Root(NULL, configPath_ + "ogre.cfg", configPath_ + "Ogre.log");125 root_ = new Ogre::Root(NULL, configPath_ + "ogre.cfg", configPath_ + "Ogre.log"); 127 126 #endif*/ 128 127 #if ORXONOX_COMPILER == ORXONOX_COMPILER_MSVC && defined(_DEBUG) … … 153 152 // Root will detect that we've already created a Log 154 153 COUT(4) << "*** GraphicsEngine: Creating Ogre Root..." << std::endl; 155 root_ = new Root(plugin_filename);154 root_ = new Ogre::Root(plugin_filename); 156 155 COUT(4) << "*** GraphicsEngine: Creating Ogre Root done" << std::endl; 157 156 } … … 160 159 * @return scene manager 161 160 */ 162 SceneManager* GraphicsEngine::getSceneManager()161 Ogre::SceneManager* GraphicsEngine::getSceneManager() 163 162 { 164 163 if(!scene_) 165 164 { 166 scene_ = root_->createSceneManager( ST_GENERIC, "Default SceneManager");165 scene_ = root_->createSceneManager(Ogre::ST_GENERIC, "Default SceneManager"); 167 166 COUT(3) << "Info: Created SceneMan: " << scene_ << std::endl; 168 167 } … … 184 183 { 185 184 this->renderWindow_ = root_->initialise(true, "OrxonoxV2"); 186 TextureManager::getSingleton().setDefaultNumMipmaps(5);185 Ogre::TextureManager::getSingleton().setDefaultNumMipmaps(5); 187 186 //TODO: Do NOT load all the groups, why are we doing that? And do we really do that? initialise != load... 188 ResourceGroupManager::getSingleton().initialiseAllResourceGroups();187 Ogre::ResourceGroupManager::getSingleton().initialiseAllResourceGroups(); 189 188 } 190 189 … … 194 193 //TODO: Work with ressource groups (should be generated by a special loader) 195 194 // Load resource paths from data file using configfile ressource type 196 ConfigFile cf;195 Ogre::ConfigFile cf; 197 196 cf.load(dataPath + "resources.cfg"); 198 197 199 198 // Go through all sections & settings in the file 200 ConfigFile::SectionIterator seci = cf.getSectionIterator();199 Ogre::ConfigFile::SectionIterator seci = cf.getSectionIterator(); 201 200 202 201 std::string secName, typeName, archName; … … 204 203 { 205 204 secName = seci.peekNextKey(); 206 ConfigFile::SettingsMultiMap *settings = seci.getNext();207 ConfigFile::SettingsMultiMap::iterator i;205 Ogre::ConfigFile::SettingsMultiMap *settings = seci.getNext(); 206 Ogre::ConfigFile::SettingsMultiMap::iterator i; 208 207 for (i = settings->begin(); i != settings->end(); ++i) 209 208 { … … 211 210 archName = i->second; // name (and location) of archive 212 211 213 ResourceGroupManager::getSingleton().addResourceLocation(212 Ogre::ResourceGroupManager::getSingleton().addResourceLocation( 214 213 std::string(dataPath + archName), 215 214 typeName, secName); … … 269 268 */ 270 269 void GraphicsEngine::messageLogged(const std::string& message, 271 LogMessageLevel lml, bool maskDebug, const std::string &logName)270 Ogre::LogMessageLevel lml, bool maskDebug, const std::string &logName) 272 271 { 273 272 int orxonoxLevel; 274 273 switch (lml) 275 274 { 276 case LML_TRIVIAL:275 case Ogre::LML_TRIVIAL: 277 276 orxonoxLevel = this->ogreLogLevelTrivial_; 278 277 break; 279 case LML_NORMAL:278 case Ogre::LML_NORMAL: 280 279 orxonoxLevel = this->ogreLogLevelNormal_; 281 280 break; 282 case LML_CRITICAL:281 case Ogre::LML_CRITICAL: 283 282 orxonoxLevel = this->ogreLogLevelCritical_; 284 283 break;
Note: See TracChangeset
for help on using the changeset viewer.