What is the performance difference between QOpenGLWindow and QOpenGLWidget?

1.5k views Asked by At

I have been looking into the two classes QOpenGLWindow and QOpenGLWidget. And in the documentation of QOpenGLWindow it states: "Unlike QOpenGLWidget, QOpenGLWindow has no dependency on the widgets module and offers better performance." In my current project, I made a QMainWindow that has a QDockWidget with an OpenGLWidget on the Dock Widget.

For this project, I am going to need the GL portion to be as efficient as possible so I am wondering if it is going to be worth the hassle of trying to convert this over into a QOpenGLWindow. However, I don't know what the performance difference is. If it's miniscule then I will keep the format I have currently, if it a huge difference then I will convert it over.

Does anyone know what the performance difference is?

1

There are 1 answers

1
Julia Ding On

QOpenGLWindow renders directly to the window (1 step). QOpenGLWidget renders to an off-screen buffer, then to the widget (2 steps).