Nymph Game Engine
Chaiscript based Game Engine
|
Class for fps counter. More...
#include <fps_counter.h>
Public Member Functions | |
FPSCounter (const float max_fps=0.0f) | |
FPSCounter cunstructer. More... | |
virtual | ~FPSCounter ()=default |
Destroys the object. More... | |
float | assessCountAndGetDelta () |
Calculates frame delta from FPS counter. More... | |
float | getMaxFPS () const noexcept |
Gets the maximum fps. More... | |
float | getCurrentFPS () const noexcept |
Gets the current fps. More... | |
float | getAverageFPS () const noexcept |
Gets the average fps. More... | |
void | resetAverageFPS () noexcept |
Resets FPS Average. More... | |
Public Member Functions inherited from Events::Subject | |
virtual | ~Subject ()=default |
virtual void | notify (std::shared_ptr< Event > event) |
notify is used to tell observers of an event. More... | |
virtual void | notifyNow (std::shared_ptr< Event > event) |
notifyNow is used to tell observers of an event as an interrupt. More... | |
virtual void | addObserver (std::shared_ptr< Observer > observer) |
Adds an observer. More... | |
virtual void | removeObserver (std::shared_ptr< Observer > observer) |
Removes an observer. More... | |
Class for fps counter.
Utility::FPSCounter::FPSCounter | ( | const float | max_fps = 0.0f | ) |
FPSCounter cunstructer.
[in] | max_fps | The maximum fps |
|
virtualdefault |
Destroys the object.
float Utility::FPSCounter::assessCountAndGetDelta | ( | ) |
Calculates frame delta from FPS counter.
References Graphics::UI::ChangeTextEvent::create(), and Events::Subject::notifyNow().
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
Resets FPS Average.
Referenced by generated::getFPSCounterModule().