Changeset 2509 for code/branches/buildsystem2/src/orxonox/gamestates
- Timestamp:
- Dec 17, 2008, 8:59:48 PM (16 years ago)
- Location:
- code/branches/buildsystem2
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/buildsystem2
- Property svn:ignore deleted
- Property svn:mergeinfo changed
/code/branches/buildsystem (added) merged: 1875,1882-1886,1975-1982,1991,1999,2054,2061,2135,2137-2139,2197-2199,2204,2214-2220,2223-2224,2229,2233-2244,2248-2249,2252-2253,2260,2275
-
code/branches/buildsystem2/src/orxonox/gamestates/GSGraphics.cc
r2171 r2509 44 44 #include "util/Debug.h" 45 45 #include "util/Exception.h" 46 #include "util/String.h" 47 #include "util/SubString.h" 46 48 #include "core/ConsoleCommand.h" 47 49 #include "core/ConfigValueIncludes.h" … … 96 98 SetConfigValue(ogreConfigFile_, "ogre.cfg") 97 99 .description("Location of the Ogre config file"); 98 SetConfigValue(ogrePluginsFile_, "plugins.cfg") 99 .description("Location of the Ogre plugins file"); 100 SetConfigValue(ogrePluginsFolder_, ".") 101 .description("Folder where the Ogre plugins are located."); 102 SetConfigValue(ogrePlugins_, "RenderSystem_GL, Plugin_ParticleFX") 103 .description("Comma separated list of all plugins to load."); 100 104 SetConfigValue(ogreLogFile_, "ogre.log") 101 105 .description("Logfile for messages from Ogre. Use \"\" to suppress log file creation."); … … 121 125 // Ogre setup procedure 122 126 setupOgre(); 127 // load all the required plugins for Ogre 128 loadOgrePlugins(); 129 // read resource declaration file 123 130 this->declareResources(); 124 this->loadRenderer(); // creates the render window 131 // Reads ogre config and creates the render window 132 this->loadRenderer(); 133 125 134 // TODO: Spread this so that this call only initialises things needed for the Console and GUI 126 135 this->initialiseResources(); … … 345 354 probe.close(); 346 355 347 ogreRoot_ = new Ogre::Root(ogrePluginsFile_, ogreConfigFile_, ogreLogFile_); 356 // Leave plugins file empty. We're going to do that part manually later 357 ogreRoot_ = new Ogre::Root("", ogreConfigFile_, ogreLogFile_); 348 358 349 359 #if 0 // Ogre 1.4.3 doesn't yet support setDebugOutputEnabled(.) … … 358 368 359 369 COUT(3) << "Ogre set up done." << std::endl; 370 } 371 372 void GSGraphics::loadOgrePlugins() 373 { 374 // just to make sure the next statement doesn't segfault 375 if (ogrePluginsFolder_ == "") 376 ogrePluginsFolder_ = "."; 377 378 #if ORXONOX_PLATFORM == ORXONOX_PLATFORM_WIN32 379 convertToWindowsPath(&ogrePluginsFolder_); 380 #else 381 convertToUnixPath(&ogrePluginsFolder_); 382 #endif 383 384 // Do some SubString magic to get the comma separated list of plugins 385 SubString plugins(ogrePlugins_, ",", " ", false, 92, false, 34, false, 40, 41, false, '\0'); 386 for (unsigned int i = 0; i < plugins.size(); ++i) 387 ogreRoot_->loadPlugin(ogrePluginsFolder_ + plugins[i]); 360 388 } 361 389 -
code/branches/buildsystem2/src/orxonox/gamestates/GSGraphics.h
r2103 r2509 60 60 61 61 void setupOgre(); 62 void loadOgrePlugins(); 62 63 void declareResources(); 63 64 void loadRenderer(); … … 105 106 std::string resourceFile_; //!< resources file name 106 107 std::string ogreConfigFile_; //!< ogre config file name 107 std::string ogrePluginsFile_; //!< ogre plugins file name 108 std::string ogrePluginsFolder_; //!< Folder where the Ogre plugins are located 109 std::string ogrePlugins_; //!< Comma separated list of all plugins to load 108 110 std::string ogreLogFile_; //!< log file name for Ogre log messages 109 111 int ogreLogLevelTrivial_; //!< Corresponding Orxonx debug level for LL_TRIVIAL
Note: See TracChangeset
for help on using the changeset viewer.