Quantcast
Channel: User HolyBlackCat - Stack Overflow
Viewing all articles
Browse latest Browse all 1287

Answer by HolyBlackCat for How to keep the CPU usage down while running an SDL program?

$
0
0

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.


Viewing all articles
Browse latest Browse all 1287

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>