SFML community forums
Help => General => Topic started by: Fantasy on May 20, 2011, 05:28:11 pm
-
hello everyone
i have a 5870 with Drivers 11.5 and my GPU usage is 60% when i build and run my game in SFML.
i don't have anything in my game its just a black windows, so why is it using 60% ?!!
thankx
-
Is it really the GPU, or do you mean "the CPU"?
-
Is it really the GPU, or do you mean "the CPU"?
yes its the GPU not CPU.
its the graphics processing unit that is getting 60% usage
-
How can you see the GPU consumption?
Can you show us your source code?
-
How can you see the GPU consumption?
Can you show us your source code?
i use AMD Catalyst Control Center to see my GPU usage.
as for the source code its just a simple black windows
#include <SFML/Window.hpp>
int main()
{
sf::Window App(sf::VideoMode(800, 600, 32), "SFML Window");
bool Running = true;
while (Running)
{
App.Display();
}
return 0;
}
-
Well that's because your framerate there will be huge. You never sleep or wait anything so you will be running as fast as the CPU can.
-
Well that's because your framerate there will be huge. You never sleep or wait anything so you will be running as fast as the CPU can.
so if i lock my frame rate to 60 it will lower both cpu and gpu usage right ?
-
It should.
-
Try using
App.SetFramerateLimit(60);
and,
App.EnableVerticalSync(true)
right after your window initialization.
-
Try using
App.SetFramerateLimit(60);
and,
App.EnableVerticalSync(true)
right after your window initialization.
That's redundant, if you do both, only one will be used, which is VSync, iirc. Just set the framerate limit to 60.