Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 4, 2009, 11:08:14 PM (15 years ago)
Author:
rgrieder
Message:

Cleanup in the GameStates (also moved debug overlay to the GraphicsManager).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core5/src/libraries/core/GraphicsManager.cc

    r5855 r5876  
    130130    GraphicsManager::~GraphicsManager()
    131131    {
     132        Loader::unload(debugOverlay_.get());
     133
    132134        Ogre::WindowEventUtilities::removeWindowEventListener(renderWindow_, ogreWindowEventListener_.get());
    133135        // TODO: Destroy the console command
     
    322324    }
    323325
     326    void GraphicsManager::loadDebugOverlay()
     327    {
     328        // Load debug overlay to show info about fps and tick time
     329        COUT(4) << "Loading Debug Overlay..." << std::endl;
     330        debugOverlay_.reset(new XMLFile("debug.oxo"));
     331        Loader::open(debugOverlay_.get());
     332    }
     333
     334    /**
     335    @note
     336        A note about the Ogre::FrameListener: Even though we don't use them,
     337        they still get called. However, the delta times are not correct (except
     338        for timeSinceLastFrame, which is the most important). A little research
     339        as shown that there is probably only one FrameListener that doesn't even
     340        need the time. So we shouldn't run into problems.
     341    */
    324342    void GraphicsManager::update(const Clock& time)
    325343    {
Note: See TracChangeset for help on using the changeset viewer.