Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 10, 2009, 5:36:45 PM (15 years ago)
Author:
rgrieder
Message:

Creating Ogre::Root in non graphics mode as well. This allows to always make use of the ResourceGroupManager.
Also removed resource related parts from GraphicsManager.

This revision does not run!

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/resource2/src/core/Core.cc

    r3370 r5614  
    313313        // creates the class hierarchy for all classes with factories
    314314        Factory::createClassHierarchy();
     315
     316        // Load OGRE excluding the renderer and the render window
     317        this->graphicsManager_.reset(new GraphicsManager(false));
    315318    }
    316319
     
    328331            return;
    329332
    330         // Load OGRE including the render window
    331         scoped_ptr<GraphicsManager> graphicsManager(new GraphicsManager());
     333        // Upgrade OGRE to receive a render window
     334        graphicsManager_->upgradeToGraphics();
    332335
    333336        // The render window width and height are used to set up the mouse movement.
    334337        size_t windowHnd = 0;
    335         graphicsManager->getRenderWindow()->getCustomAttribute("WINDOW", &windowHnd);
     338        graphicsManager_->getRenderWindow()->getCustomAttribute("WINDOW", &windowHnd);
    336339
    337340        // Calls the InputManager which sets up the input devices.
     
    339342
    340343        // load the CEGUI interface
    341         guiManager_.reset(new GUIManager(graphicsManager->getRenderWindow()));
    342 
    343         // Dismiss scoped pointers
    344         graphicsManager_.swap(graphicsManager);
     344        guiManager_.reset(new GUIManager(graphicsManager_->getRenderWindow()));
     345
     346        // Dismiss scoped pointer
    345347        inputManager_.swap(inputManager);
    346348
     
    356358        this->inputManager_.reset();;
    357359        this->graphicsManager_.reset();
     360
     361        // Load Ogre::Root again, but without the render system
     362        this->graphicsManager_.reset(new GraphicsManager(false));
    358363
    359364        bGraphicsLoaded_ = false;
Note: See TracChangeset for help on using the changeset viewer.