SFML community forums
Help => General => Topic started by: sggocu88 on February 15, 2017, 07:05:22 pm
-
Hi. If i don't put window.clear() and window.display() inside the main loop my game have 40-50 cpu usage. If i put them, my game have 1-2 cpu usage.
Why ? Or it's a problem with my pc ?
Sry for bad english
-
window.display() will sleep (pause) if vertical sync is enabled by your graphics driver (or your code). If your main loop makes no pause, your app will consume as much CPU as it can, which means 50% on a dual core CPU.
PS: that's just a guess since you give almost no information