Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 26, 2009, 2:15:08 PM (15 years ago)
Author:
rgrieder
Message:

Loading and unloading graphics automatically: As soon as a GameState requires graphics (defined at the GameState declaration with a bool) it gets loaded. And vice versa.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/resource/src/orxonox/gamestates/GSGraphics.cc

    r3349 r3355  
    5757    DeclareGameState(GSGraphics, "graphics", false, true);
    5858
    59     GSGraphics::GSGraphics(const GameStateConstrParams& params)
    60         : GameState(params)
     59    GSGraphics::GSGraphics(const GameStateInfo& info)
     60        : GameState(info)
    6161        , console_(0)
    6262        , soundManager_(0)
     
    8888    void GSGraphics::activate()
    8989    {
    90         // Load OGRE, CEGUI and OIS
    91         Core::getInstance().loadGraphics();
    92 
    9390        // load debug overlay
    9491        COUT(3) << "Loading Debug Overlay..." << std::endl;
     
    147144        // HACK: (destroys a resource smart pointer)
    148145        Map::hackDestroyMap();
    149 
    150         // Unload OGRE, CEGUI and OIS
    151         Core::getInstance().loadGraphics();
    152146    }
    153147
Note: See TracChangeset for help on using the changeset viewer.