FPS-Counter copied, more stuff done
This commit is contained in:
parent
0dd5f62c07
commit
b8ca31cb20
5 changed files with 227 additions and 44 deletions
19
SDL_FPSCounter.h
Normal file
19
SDL_FPSCounter.h
Normal file
|
@ -0,0 +1,19 @@
|
|||
#ifndef SDL_FPSCOUNTER_H
|
||||
#define SDL_FPSCOUNTER_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
typedef struct SDL_FPSCounter_s {
|
||||
uint64_t frequency;
|
||||
uint32_t window_index;
|
||||
uint32_t window_length;
|
||||
uint64_t* window;
|
||||
} SDL_FPSCounter;
|
||||
|
||||
int SDL_CreateFPSCounter(SDL_FPSCounter* counter, uint32_t window_length);
|
||||
void SDL_DestroyFPSCounter(SDL_FPSCounter* counter);
|
||||
|
||||
int SDL_FPSCounterTick(SDL_FPSCounter* counter);
|
||||
uint64_t SDL_FPSCounterFPS(SDL_FPSCounter* counter);
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue