Important: Please read the Qt Code of Conduct -

Multiple QOpenGLWidgets and Linux

  • I'm writing an application that will have multiple top level windows on Red Hat 7. Using QOpenGLWidgets, for each window the frame rate is whatever VSync is divided by the number of Windows. I.e. If I have 4 windows, the frame rate is 12 fps, even if I'm just rendering a blank screen. On Windows 10, every window runs @ 60 fps. If I break up the program into multiple processes, every process runs @ 60 fps. But if I try to merge them into 1 process, it's 12 fps. Even running the OpenGL Multithread example included with Qt, that runs only @ 12 fps on my Linux station. If I remove OpenGL and run everything using a QImage, I get 30-40 fps. I'm just wondering how to approach this, as I'm trying to hit 60 fps. (The rendering to a backbuffer works as expected, and I'm hitting the 60 fps mark. But what's displayed on the screen in the windows is only 12 fps).

  • Try making a minimal, compilable example. What GPU, hardware, drivers, etc? It's definitely not expected behavior, so you'll need to be more specific about what you are doing for anybody to be able to usefully help you. I definitely use multiple OpenGL widgets in one app without seeing any similar slowdown.

    How are you flipping the backbuffer to the front? Any blocking stuff like gl Fence, gl Finish, etc. ?

Log in to reply