What is the performance difference between QOpenGLWindow and QOpenGLWidget?
Asked Answered
M

1

6

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?

Mountaineer answered 26/3, 2019 at 18:18 Comment(0)
J
2

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

Jeffryjeffy answered 2/4, 2019 at 9:1 Comment(1)
And what does the difference become when updateBehavior is not QOpenGLWindow::NoPartialUpdate?Grosswardein

© 2022 - 2024 — McMap. All rights reserved.