For me, the automatic delay between frames (caused by vsync) was consuming 100% of one CPU core while enabled. So before swapping the buffers, I started predicting what the delay will be and sleeping (SDL_Delay
) that amount, rounded down to the millisecond, and then swapping.
↧
Answer by HolyBlackCat for How to keep the CPU usage down while running an SDL program?
↧