TazGraph Project v0.1.0
Loading...
Searching...
No Matches
BaseFPSLimiter.h
1#pragma once
2
3#include <SDL2/SDL.h>
4
6public:
7 static constexpr int fps_history_count = 100;
8
10
11 void init(float maxFPS);
12
13 void setMaxFPS(float maxFPS);
14
15 void begin();
16
17 //end will return the current FPS
18 float end();
19
20 float fpsHistory[fps_history_count] = { 0 };
21 int fpsHistoryIndx = 0;
22
23 float fps;
24 float maxFPS;
25 Uint32 frameTime;
26 Uint32 startTicks;
27
28 void setHistoryValue(float currentFPS);
29
30private:
31 void calculateFPS();
32
33};
Definition BaseFPSLimiter.h:5