Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QOpenGLWidget: framerate with vsync is 30 FPS instead of 60, why? (On Raspberry Pi 4)
Forum Updated to NodeBB v4.3 + New Features

QOpenGLWidget: framerate with vsync is 30 FPS instead of 60, why? (On Raspberry Pi 4)

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 3 Posters 490 Views 3 Watching
  • 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.
  • V Offline
    V Offline
    Violet Giraffe
    wrote on last edited by Violet Giraffe
    #1

    Hi! I have a simple application with QOpenGLWidget. I've overriden its paintEvent() and do simple painting with QPainter. For framerate control I have ensured vsync (swapInterval == 1) and I have connected to the widgets' frameSwapped() signal. This signal flags another thread to prepare data for the new frame, then that thread calls update() on the widget.

    On my Windows desktop with Intel iGPU, with monitor set to 60 Hz, I get stable 60 fps (16.7 ms). But on Raspberry Pi 4B, with monitor again set to 60 Hz, and with the exact same code, I only get 30 FPS (33.2 ms). Why is that?

    I have tried removing any painting to make sure it's not simply too slow, now I have this:

    void paintEvent(QPaintEvent*) override {
       QPainter p{this};
    }
    

    And still it's 30 FPS, so it seems that this is what OpenGL is locked at. I don't imagine a no-op draw cannot complete in 16 ms.

    I've tried single-, double- and triple-buffering, exact same result.

    P. S. Qt 6.5.2 on Windows and 6.4.2 on Raspberry (the latest available from apt, as Qt Company doesn't offer ARM64 Linux binaries in its online installer, nor the installer itself for ARM64, for that matter).
    The OS is the latest official Raspberry Pi OS (Bookworm) 64-bit.

    1 Reply Last reply
    2
    • D Offline
      D Offline
      devMiyax
      wrote on last edited by
      #2

      I have the same issue on a AMD device. Did you fix it?

      V 1 Reply Last reply
      0
      • S Offline
        S Offline
        SamiV123
        wrote on last edited by
        #3
        This post is deleted!
        1 Reply Last reply
        0
        • D devMiyax

          I have the same issue on a AMD device. Did you fix it?

          V Offline
          V Offline
          Violet Giraffe
          wrote on last edited by
          #4

          @devMiyax you're not on Pi, so I doubt it's the same issue.

          1 Reply Last reply
          0

          • Login

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