Important: Please read the Qt Code of Conduct -

OpenGL rendering always uses 100% GPU

  • I wanted to get a first impression of Qt and compiled the example "openglwindow", that shows just a rotating coloured triangle at the screen refresh rate.
    I remarked that my graphics adaptor is always at nearly 100% GPU usage when running this simple example, while the CPU usage is low. When I set QSurfaceFormat to one refresh per second (setSwapInterval(60)), the triangle is updated just once per second as expected, but still the GPU usage is at 100%, and the system responds very slow to mouse or keyboard events.
    The same seems to occur in other samples like "openglunderqml", the GPU is always at maximum load.

    I probably did not understand some fundamental things about what the rendering loop does here.

    Qt Creator Community OpenGL, VC2013, Windows 7/64, Intel i7, VGA AMD 7850, all drivers are up-to-date

  • Additional info:

    When I place a QThread::usleep(16667) inside the rendering loop, and create the window with QSurfaceFormat::setSwapInterval(0) (no vertical sync), the rendering runs smoothly at no noticeable GPU load. With vertical synchronisation switched on (setSwapInterval(1)), there are in fact not more than 60 fps rendered, but the GPU is heavily working on something.
    The same occurs on another system (Qt Creator Community OpenGL, mingw, Win32, Intel Q6600, VGA AMD 3850). Can anyone confirm this?

Log in to reply