Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. OpenGL cpu benchmark QtQuick vs OSX Native
QtWS25 Last Chance

OpenGL cpu benchmark QtQuick vs OSX Native

Scheduled Pinned Locked Moved QML and Qt Quick
openglperformancecpuosxqopenglframebuf
3 Posts 2 Posters 2.2k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    bdg85
    wrote on 3 Sept 2015, 09:22 last edited by bdg85 9 Mar 2015, 10:17
    #1

    Dear all,

    I noticed some heavy cpu usage in a QtQuick (using Qt5.5) osx app compared to an equivalent Native OSX app. Around 5% more cpu usage with a simple app, up to 15% more with more complex OpenGL tasks.

    Both are using Core profile
    Version: 4.1 INTEL-10.6.33
    GLSL: 4.10

    In QtQuick I do openGL inside a QQuickFramebufferObject as I've seen advised many times.
    In OSX I draw inside a subclass of NSOpenGLView.

    Here are the OpenGL Profiler statistics: http://pastebin.com/uWyy8RMk
    Where you can see that CGLFlushDrawable takes so much longer in QtQuick (avg 15418.39 microsec) than in Native OSX App (avg 1287.65 microsec).

    I know that what CGLFlushDrawable really does is to set the internal OpenGL state and then do the drawing, so I wonder if I am misusing QtQuick OpenGL somehow. Here is how I set up OpenGL in QtQuick app:

    QSurfaceFormat f;
    f.setVersion(4, 1);
    f.setProfile(QSurfaceFormat::CoreProfile);
    QSurfaceFormat::setDefaultFormat(f);
    

    Then, when setting the framebuffer (inside QQuickFramebufferObject::Renderer method createFramebufferObject):

    QOpenGLFramebufferObjectFormat format;
    format.setAttachment(QOpenGLFramebufferObject::Depth);
    format.setInternalTextureFormat(GL_RGB);
    format.setSamples(0);
    

    I really hope there is a solution that makes me achieve similar performance because I really enjoy QML and I'd like to continue using it.

    Hardware used:
    MacBookPro 13'' with retina screen,
    cpu: 3 GHz Intel Core i7
    gpu: Intel Iris 1536 MB

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 3 Sept 2015, 21:20 last edited by
      #2

      Hi,

      I'd recommend bringing this to the interest mailing list. You'll find there Qt's developers/maintainers (This forum is more user oriented) Don't forget to subscribe first.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      B 1 Reply Last reply 3 Sept 2015, 21:57
      0
      • S SGaist
        3 Sept 2015, 21:20

        Hi,

        I'd recommend bringing this to the interest mailing list. You'll find there Qt's developers/maintainers (This forum is more user oriented) Don't forget to subscribe first.

        B Offline
        B Offline
        bdg85
        wrote on 3 Sept 2015, 21:57 last edited by
        #3

        @SGaist
        Thank you for the reply, SGaist! I'll do it.

        1 Reply Last reply
        0

        2/3

        3 Sept 2015, 21:20

        • Login

        • Login or register to search.
        2 out of 3
        • First post
          2/3
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved