DEKI/ENGINE docs
manual api reference
Deki 0.40.1
Modular C++ engine with a visual editor, for 2D and 3D
Loading...
Searching...
No Matches
Deki::FPSCounter Class Reference

Measures the frame rate the engine reaches, averaged over recent frames. More...

#include <deki/FPSCounter.h>

Public Member Functions

 FPSCounter ()
void BeginFrame ()
 Call at the start of each frame.
void EndFrame ()
 Call at the end of each frame.
float GetAverageFrameTime () const
 Average frame time in milliseconds.
float GetFPS () const
 Frames per second, averaged over the last kSampleCount frames.
float GetMaxFPS () const
float GetMinFPS () const
uint32_t GetTotalFrames () const
bool IsEnabled () const
void PrintStats () const
 Writes the statistics to the log.
void Reset ()
 Clears all statistics.
void SetEnabled (bool enable)

Detailed Description

Measures the frame rate the engine reaches, averaged over recent frames.

Constructor & Destructor Documentation

◆ FPSCounter()

Deki::FPSCounter::FPSCounter ( )

Member Function Documentation

◆ BeginFrame()

void Deki::FPSCounter::BeginFrame ( )

Call at the start of each frame.

◆ EndFrame()

void Deki::FPSCounter::EndFrame ( )

Call at the end of each frame.

◆ GetAverageFrameTime()

float Deki::FPSCounter::GetAverageFrameTime ( ) const

Average frame time in milliseconds.

◆ GetFPS()

float Deki::FPSCounter::GetFPS ( ) const
inline

Frames per second, averaged over the last kSampleCount frames.

◆ GetMaxFPS()

float Deki::FPSCounter::GetMaxFPS ( ) const
inline

◆ GetMinFPS()

float Deki::FPSCounter::GetMinFPS ( ) const
inline

◆ GetTotalFrames()

uint32_t Deki::FPSCounter::GetTotalFrames ( ) const
inline

◆ IsEnabled()

bool Deki::FPSCounter::IsEnabled ( ) const
inline

◆ PrintStats()

void Deki::FPSCounter::PrintStats ( ) const

Writes the statistics to the log.

◆ Reset()

void Deki::FPSCounter::Reset ( )

Clears all statistics.

◆ SetEnabled()

void Deki::FPSCounter::SetEnabled ( bool enable)
inline

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