SFML community forums

Help => General => Topic started by: Fantasy on May 20, 2011, 05:28:11 pm

Title: GPU usage is very high AMD 5870
Post 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
Title: GPU usage is very high AMD 5870
Post by: Laurent on May 20, 2011, 05:31:33 pm
Is it really the GPU, or do you mean "the CPU"?
Title: GPU usage is very high AMD 5870
Post by: Fantasy on May 20, 2011, 05:35:07 pm
Quote from: "Laurent"
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
Title: GPU usage is very high AMD 5870
Post by: Laurent on May 20, 2011, 05:42:15 pm
How can you see the GPU consumption?

Can you show us your source code?
Title: GPU usage is very high AMD 5870
Post by: Fantasy on May 20, 2011, 05:53:50 pm
Quote from: "Laurent"
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

Code: [Select]

#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;
}
Title: GPU usage is very high AMD 5870
Post by: Groogy on May 20, 2011, 06:18:10 pm
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.
Title: GPU usage is very high AMD 5870
Post by: Fantasy on May 20, 2011, 07:10:15 pm
Quote from: "Groogy"
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 ?
Title: GPU usage is very high AMD 5870
Post by: Groogy on May 20, 2011, 09:03:21 pm
It should.
Title: GPU usage is very high AMD 5870
Post by: alphazeeno on May 23, 2011, 01:45:14 am
Try using

Code: [Select]
App.SetFramerateLimit(60);

and,

Code: [Select]
App.EnableVerticalSync(true)

right after your window initialization.
Title: GPU usage is very high AMD 5870
Post by: OniLinkPlus on May 23, 2011, 02:12:35 am
Quote from: "alphazeeno"
Try using

Code: [Select]
App.SetFramerateLimit(60);

and,

Code: [Select]
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.