Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 28, 2008, 8:30:25 PM (16 years ago)
Author:
rgrieder
Message:
  • Wrote Clock() class: It starts an internal clock when GSRoot starts and gets handed to all GameState ticks as reference. You can then either query the ticked time or the real time (for instance for statistical measurements)
  • general clean up in all the game states
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/gui/src/orxonox/gamestates/GSGraphics.h

    r1672 r1674  
    4848        void enter();
    4949        void leave();
    50         void ticked(float dt, uint64_t time);
    51 
    52         // config values
    53         float                 debugRefreshTime_;
     50        void ticked(const Clock& time);
    5451
    5552        Ogre::Root*           ogreRoot_;
    56         GraphicsEngine*       graphicsEngine_;   //!< our dearest graphics engine <3
     53        GraphicsEngine*       graphicsEngine_;   //!< pointer to GraphicsEngine instance
    5754        InputManager*         inputManager_;
    5855        InGameConsole*        console_;
    5956        GUIManager*           guiManager_;
    6057
    61 
    6258        // variables for time statistics
    6359        unsigned long         frameCount_;
    64 
    65         //const unsigned long refreshTime = (unsigned long)(debugRefreshTime_ * 1000000.0f);
    66         //unsigned long refreshStartTime;
    67         //unsigned long tickTime;
    68         //unsigned long oldFrameCount;
    69 
    70         //unsigned long timeBeforeTick;
    71         //unsigned long timeBeforeTickOld;
    72         //unsigned long timeAfterTick;
     60        unsigned int          statisticsRefreshCycle_;
     61        uint64_t              statisticsStartTime_;
     62        unsigned long         statisticsStartCount_;
     63        unsigned int          tickTime_;
    7364    };
    7465}
Note: See TracChangeset for help on using the changeset viewer.