fps theorique
This commit is contained in:
@@ -14,8 +14,8 @@
|
|||||||
#define SEED (5)
|
#define SEED (5)
|
||||||
#define WIDTH (1600)
|
#define WIDTH (1600)
|
||||||
#define HEIGHT (1200)
|
#define HEIGHT (1200)
|
||||||
#define SIM_WIDTH (800)
|
#define SIM_WIDTH (1600)
|
||||||
#define SIM_HEIGHT (600)
|
#define SIM_HEIGHT (1200)
|
||||||
#define N_SIMULATION (100)
|
#define N_SIMULATION (100)
|
||||||
|
|
||||||
const int FPS = 60;
|
const int FPS = 60;
|
||||||
@@ -95,8 +95,9 @@ int main(int argc, char* argv[]) {
|
|||||||
if (next_frame)
|
if (next_frame)
|
||||||
next_frame = 0;
|
next_frame = 0;
|
||||||
}
|
}
|
||||||
printf("Average time between frames : %.6fs\n",
|
double avg_time = avg_time_frame(timeframe);
|
||||||
avg_time_frame(timeframe));
|
printf("Average time between frames : %.6fs (%.2ffps)\n", avg_time,
|
||||||
|
1 / avg_time);
|
||||||
SDL_DestroyTexture(tex);
|
SDL_DestroyTexture(tex);
|
||||||
SDL_DestroyRenderer(ren);
|
SDL_DestroyRenderer(ren);
|
||||||
SDL_DestroyWindow(win);
|
SDL_DestroyWindow(win);
|
||||||
|
|||||||
Reference in New Issue
Block a user