FrameTimer Class Reference

#include <FrameTimer.h>

Inheritance diagram for FrameTimer:

GameStateI

List of all members.

Public Member Functions

float getFPS ()
unsigned int getLastStateCount ()
unsigned int getLastTris ()
unsigned int getLastTextureSets ()
virtual void draw (const unsigned state)
virtual void simulate (const unsigned state, float frameTime)

Static Public Member Functions

static FrameTimerinstance ()

Protected Attributes

float totalTime_
int frameCount_
Clock frameClock_
unsigned int lastStateCount_
unsigned int lastTris_
unsigned int lastTextureSets_
float fps_

Static Protected Attributes

static FrameTimerinstance_ = 0

Private Member Functions

 FrameTimer ()
virtual ~FrameTimer ()


Detailed Description

Definition at line 27 of file FrameTimer.h.


Constructor & Destructor Documentation

FrameTimer::FrameTimer (  )  [private]

Definition at line 41 of file FrameTimer.cpp.

FrameTimer::~FrameTimer (  )  [private, virtual]

Definition at line 50 of file FrameTimer.cpp.


Member Function Documentation

FrameTimer * FrameTimer::instance (  )  [static]

Definition at line 31 of file FrameTimer.cpp.

References instance_.

Referenced by ClientState::addMandatoryComponents(), and HelpButtonDialog::PerformanceMenu::getMenuToolTip().

float FrameTimer::getFPS (  )  [inline]

Definition at line 32 of file FrameTimer.h.

References fps_.

unsigned int FrameTimer::getLastStateCount (  )  [inline]

Definition at line 33 of file FrameTimer.h.

References lastStateCount_.

unsigned int FrameTimer::getLastTris (  )  [inline]

Definition at line 34 of file FrameTimer.h.

References lastTris_.

unsigned int FrameTimer::getLastTextureSets (  )  [inline]

Definition at line 35 of file FrameTimer.h.

References lastTextureSets_.

void FrameTimer::draw ( const unsigned  state  )  [virtual]

Reimplemented from GameStateI.

Definition at line 55 of file FrameTimer.cpp.

References frameCount_, GLInfo::getNoTriangles(), GLState::getStateSwitches(), GLTexture::getTextureSets(), lastStateCount_, lastTextureSets_, lastTris_, GLInfo::resetNoTriangles(), GLState::resetStateSwitches(), and GLTexture::resetTextureSets().

void FrameTimer::simulate ( const unsigned  state,
float  frameTime 
) [virtual]

Reimplemented from GameStateI.

Definition at line 69 of file FrameTimer.cpp.

References ChannelText::eNoLog, ChannelText::eNoSound, S3D::formatStringBuffer(), fps_, frameClock_, frameCount_, Clock::getTimeDifference(), ClientChannelManager::instance(), OptionsDisplay::instance(), LANG_RESOURCE_1, ChannelText::setFlags(), ClientChannelManager::showText(), and totalTime_.


Member Data Documentation

FrameTimer * FrameTimer::instance_ = 0 [static, protected]

Definition at line 42 of file FrameTimer.h.

Referenced by instance().

float FrameTimer::totalTime_ [protected]

Definition at line 43 of file FrameTimer.h.

Referenced by simulate().

int FrameTimer::frameCount_ [protected]

Definition at line 44 of file FrameTimer.h.

Referenced by draw(), and simulate().

Clock FrameTimer::frameClock_ [protected]

Definition at line 45 of file FrameTimer.h.

Referenced by simulate().

unsigned int FrameTimer::lastStateCount_ [protected]

Definition at line 46 of file FrameTimer.h.

Referenced by draw(), and getLastStateCount().

unsigned int FrameTimer::lastTris_ [protected]

Definition at line 46 of file FrameTimer.h.

Referenced by draw(), and getLastTris().

unsigned int FrameTimer::lastTextureSets_ [protected]

Definition at line 46 of file FrameTimer.h.

Referenced by draw(), and getLastTextureSets().

float FrameTimer::fps_ [protected]

Definition at line 47 of file FrameTimer.h.

Referenced by getFPS(), and simulate().


The documentation for this class was generated from the following files:
Generated on Mon Feb 16 15:15:01 2009 for Scorched3D by  doxygen 1.5.3