Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-43298

QOpenGLWidget causes high cpu usage when updating at 60+fps

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • P3: Somewhat important
    • None
    • 5.4.0
    • None
    • Windows8.1,Geforce344.75,qt-opensource-windows-x86-msvc2013-5.4.0

    Description

      #include <QtWidgets>

      int main(int argc, char *argv[])
      {
      QApplication a(argc, argv);
      QOpenGLWidget w;
      w.resize(800,600);
      w.show();
      QTimer t(&w);
      QObject::connect(&t,&QTimer::timeout,[&]()

      {w.update();}

      );
      t.setInterval(10);
      t.start();
      return a.exec();
      }

      this widget updates at 100fps and uses 29% of my cpu, 30 times more than the usage at 50fps.
      it only happens on Qt::AA_UseDesktopOpenGL, Qt::AA_UseOpenGLES is OK.

      I mean call QOpenGLWidget::update() 100 times per second. The refresh rate has been throttled to 60 fps, but there shouldn't be such a high usage.(0.9% at 50 calls per second, but 29% at 100 calls)

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            lagocs Laszlo Agocs
            ancientlysine Lysine Liu
            Votes:
            4 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes