#include <fpscontrol.h>
Public Member Functions | |
| FPSControl () | |
| bool | NeedsGraphicRefresh () |
| bool | NeedsLogicRefresh () |
| void | StartGraphicTimer () |
| void | StartLogicTimer () |
| void | StopGraphicTimer () |
| void | StopLogicTimer () |
| void | SetGraphicFrames (unsigned short frames) |
| void | SetLogicFrames (unsigned short frames) |
| void | Measure () |
Protected Attributes | |
| unsigned int | m_time |
| unsigned int | m_logictime |
| unsigned int | m_graphictime |
| bool | m_graphicrefresh |
| bool | m_logicrefresh |
| int | m_logicfreetime |
| int | m_graphicfreetime |
| unsigned int | m_nextlogicrefresh |
| unsigned int | m_nextgraphicrefresh |
| unsigned short | m_desiredlframes |
| unsigned short | m_desiredgframes |
| FPSControl::FPSControl | ( | ) |
| bool FPSControl::NeedsGraphicRefresh | ( | ) | [inline] |
A function that should be called to know if a graphic update is needed or not
| bool FPSControl::NeedsLogicRefresh | ( | ) | [inline] |
A function that should be called to know if a logic update is needed or not
| void FPSControl::StartGraphicTimer | ( | ) | [inline] |
A function that starts the graphic timer(should be called before graphic instructions)
| void FPSControl::StartLogicTimer | ( | ) | [inline] |
A function that starts the logic timer(should be called before logic instructions)
| void FPSControl::StopGraphicTimer | ( | ) |
A function that stops the graphic timer(should be called after graphic instructions) Also calculates, when the next update is needed.
| void FPSControl::StopLogicTimer | ( | ) |
A function that starts the logic timer(should be called after logic instructions) Also calculates, when the next update is needed.
| void FPSControl::SetGraphicFrames | ( | unsigned short | frames | ) | [inline] |
Sets the desired graphic frames
| frames | the number of frames per second |
| void FPSControl::SetLogicFrames | ( | unsigned short | frames | ) | [inline] |
Sets the desired logic frames
| frames | the number of frames per second |
| void FPSControl::Measure | ( | ) |
Calculates the idle time and what should be updated first. Prefers logic frames. Should be called after the logic and graphic stuff.
unsigned int FPSControl::m_time [protected] |
unsigned int FPSControl::m_logictime [protected] |
unsigned int FPSControl::m_graphictime [protected] |
bool FPSControl::m_graphicrefresh [protected] |
bool FPSControl::m_logicrefresh [protected] |
int FPSControl::m_logicfreetime [protected] |
int FPSControl::m_graphicfreetime [protected] |
unsigned int FPSControl::m_nextlogicrefresh [protected] |
unsigned int FPSControl::m_nextgraphicrefresh [protected] |
unsigned short FPSControl::m_desiredlframes [protected] |
unsigned short FPSControl::m_desiredgframes [protected] |
1.5.1-p1