le3d - LightEngine 3D
A straightforward C++ 3D software engine for real-time graphics
Public Member Functions | Public Attributes | List of all members
LeTiming Class Reference

Abstract OS native time measurement & process yielding. More...

#include <timing.h>

Public Member Functions

 LeTiming ()
 
 ~LeTiming ()
 
void setup (int targetFPS)
 Configure the frame timing system. More...
 
void firstFrame ()
 Mark the time of the first frame. More...
 
void lastFrame ()
 Mark the time of the last frame. More...
 
bool isNextFrame ()
 Is it the time to display the next frame? More...
 
void waitNextFrame ()
 Wait until it is time to display the next frame. More...
 

Public Attributes

float fps
 
bool enableDisplay
 

Detailed Description

Abstract OS native time measurement & process yielding.

Constructor & Destructor Documentation

LeTiming::LeTiming ( )
LeTiming::~LeTiming ( )

Member Function Documentation

void LeTiming::firstFrame ( )

Mark the time of the first frame.

bool LeTiming::isNextFrame ( )

Is it the time to display the next frame?

Returns
true if it is time, false else
void LeTiming::lastFrame ( )

Mark the time of the last frame.

void LeTiming::setup ( int  targetFPS)

Configure the frame timing system.

Parameters
[in]targetFPSdesired application FPS
void LeTiming::waitNextFrame ( )

Wait until it is time to display the next frame.

Member Data Documentation

bool LeTiming::enableDisplay

periodically displays FPS in console

float LeTiming::fps

current game FPS


The documentation for this class was generated from the following files: