SFML community forums
Help => General => Topic started by: smilesprower on June 03, 2017, 05:24:02 pm
-
Quick question
Why is my cpu usage at 100% when I enable vsync ?
If I used window.setFramerateLimit(60) this is not the case and the cpu usage is relatively low
My graphics card is a nvidia gtx970.
Thanks
int main()
{
sf::RenderWindow window(sf::VideoMode(200, 200), "SFML works!");
window.setVerticalSyncEnabled(true);
while (window.isOpen())
{
sf::Event event;
while (window.pollEvent(event)){
if (event.type == sf::Event::Closed)
window.close();
}
window.clear();
window.display();
}
return 0;
}
-
Check your GPU driver settings, some allow to globally set it to on or off.
-
The frames are still locked to 60 its just using 100% cpu time.