Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 14, 2008, 3:42:49 AM (16 years ago)
Author:
landauf
Message:

merged core2 back to trunk
there might be some errors, wasn't able to test it yet due to some strange g++ and linker behaviour.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/orxonox/GraphicsEngine.cc

    r1042 r1052  
    4242
    4343#include "core/CoreIncludes.h"
     44#include "core/ConfigValueIncludes.h"
    4445#include "core/Debug.h"
    4546
    4647
    4748namespace orxonox {
    48 
    49   using namespace Ogre;
    5049
    5150  /**
     
    9695    this->renderWindow_ = 0;
    9796    // 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();
    103102    }
    104103    COUT(4) << "*** GraphicsEngine: Destroying objects done" << std::endl;
     
    121120    //TODO: Check if file exists (maybe not here)
    122121/*#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",
    124123                     configPath_ + "Ogre.log");
    125124#else
    126     root_ = new Root(NULL, configPath_ + "ogre.cfg", configPath_ + "Ogre.log");
     125    root_ = new Ogre::Root(NULL, configPath_ + "ogre.cfg", configPath_ + "Ogre.log");
    127126#endif*/
    128127#if ORXONOX_COMPILER == ORXONOX_COMPILER_MSVC && defined(_DEBUG)
     
    153152    // Root will detect that we've already created a Log
    154153    COUT(4) << "*** GraphicsEngine: Creating Ogre Root..." << std::endl;
    155     root_ = new Root(plugin_filename);
     154    root_ = new Ogre::Root(plugin_filename);
    156155    COUT(4) << "*** GraphicsEngine: Creating Ogre Root done" << std::endl;
    157156  }
     
    160159   * @return scene manager
    161160   */
    162   SceneManager* GraphicsEngine::getSceneManager()
     161  Ogre::SceneManager* GraphicsEngine::getSceneManager()
    163162  {
    164163    if(!scene_)
    165164    {
    166       scene_ = root_->createSceneManager(ST_GENERIC, "Default SceneManager");
     165      scene_ = root_->createSceneManager(Ogre::ST_GENERIC, "Default SceneManager");
    167166      COUT(3) << "Info: Created SceneMan: " << scene_ << std::endl;
    168167    }
     
    184183  {
    185184    this->renderWindow_ = root_->initialise(true, "OrxonoxV2");
    186     TextureManager::getSingleton().setDefaultNumMipmaps(5);
     185    Ogre::TextureManager::getSingleton().setDefaultNumMipmaps(5);
    187186    //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();
    189188  }
    190189
     
    194193    //TODO: Work with ressource groups (should be generated by a special loader)
    195194    // Load resource paths from data file using configfile ressource type
    196     ConfigFile cf;
     195    Ogre::ConfigFile cf;
    197196    cf.load(dataPath + "resources.cfg");
    198197
    199198    // Go through all sections & settings in the file
    200     ConfigFile::SectionIterator seci = cf.getSectionIterator();
     199    Ogre::ConfigFile::SectionIterator seci = cf.getSectionIterator();
    201200
    202201    std::string secName, typeName, archName;
     
    204203    {
    205204      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;
    208207      for (i = settings->begin(); i != settings->end(); ++i)
    209208      {
     
    211210        archName = i->second; // name (and location) of archive
    212211
    213         ResourceGroupManager::getSingleton().addResourceLocation(
     212        Ogre::ResourceGroupManager::getSingleton().addResourceLocation(
    214213                                           std::string(dataPath + archName),
    215214                                           typeName, secName);
     
    269268  */
    270269  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)
    272271  {
    273272    int orxonoxLevel;
    274273    switch (lml)
    275274    {
    276       case LML_TRIVIAL:
     275      case Ogre::LML_TRIVIAL:
    277276        orxonoxLevel = this->ogreLogLevelTrivial_;
    278277        break;
    279       case LML_NORMAL:
     278      case Ogre::LML_NORMAL:
    280279        orxonoxLevel = this->ogreLogLevelNormal_;
    281280        break;
    282       case LML_CRITICAL:
     281      case Ogre::LML_CRITICAL:
    283282        orxonoxLevel = this->ogreLogLevelCritical_;
    284283        break;
Note: See TracChangeset for help on using the changeset viewer.