[Interest] QOpenGLWidget's performance drop
nanthiran2005 at gmail.com
Wed Feb 16 11:53:24 CET 2022
Recently I have upgraded from Qt-5.4.1 to Qt-5.15.2. The following is my
- External display connected to External GPU, and made as the primary
screen, connected to a macbook
In my simple testApp, I have 2 QOpenGLWidget and 1 QWidget. I just simply
render a triangle in those QOpenGLWidgets which changes color every 16ms.
The rendering performance in my app used to be 60fps as it was rendering on
the external GPU. However, after Qt-5.15 upgrade, I noticed the performance
is about 45fps and there are load in my macbook's Intel GPU.
Upon investigating, I found out that its due to QOffscreenSurface's change
to be not window-backed anymore. Since QOpenGLWidget internally uses
QOffscreenSurface, I believe this is causing the rendering to not happen on
the screen's GPU. When I hack the code to make the QOffscreenSurface to
window-backed, I'm able to get the same performance as before.
So is there any clean way to achieve the same performance I used to
achieve? If not, are there any effects if I force the QOffscreenSurface to
be window backed for MacOS?
Thanks in advance.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Interest