- For timing in render loop use:
std::chrono
,SDL_GetPerformanceFrequency();
orSDL_GetPerformanceCounter();
. - If the cpu and gpu usage are hight insert a delay in the render loop
SDL_Delay(1);
or activatefreesync
in the renderer.
std::chrono
, SDL_GetPerformanceFrequency();
or SDL_GetPerformanceCounter();
.SDL_Delay(1);
or activate freesync
in the renderer.