#include <gmlframecounter.h>
Public Member Functions | |
FrameCounter () | |
constructor | |
~FrameCounter () | |
destructor | |
void | SetUpdateSpeed (double ms) |
Set counted update speed in milliseconds. | |
double | GetUpdateSpeed () const |
Return counter update speed. | |
void | SetMinimumFrameCount (int count) |
Set minimum number of frames needed to calculate FPS. | |
double | GetMinimumFrameCount () const |
Return counter update speed. | |
void | Reset () |
Signal that animation cycle is started. | |
void | FrameStarted () |
Signal that current frame is to be drawn. | |
void | FrameFinished () |
Signal that current frame is finished. | |
bool | Updated () const |
Tells whether FPS has been updated. | |
double | GetFrameCount () const |
Return the framecount (frames per second). | |
double | GetMeanFrameTime () const |
Return the mean frame time (msec). |
|
Set minimum number of frames needed to calculate FPS. FPS will be made and Updated() flag will be set only if time since latest update > update speed and number of drawn frames (calls to FrameFinished()) > minimum number of frames |
|
Signal that animation cycle is started. Probably should be called before first frame |
|
Signal that current frame is to be drawn. Should be called before each scene display |
|
Signal that current frame is finished. Should be called after each scene display |
|
Tells whether FPS has been updated. Check this after call to FrameFinished. Flag cleared after next call to FrameFinished |