5

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?

Sailanarmo
  • 1,139
  • 15
  • 41

1 Answers1

2

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

Adrian Mole
  • 49,934
  • 160
  • 51
  • 83
Julia Ding
  • 173
  • 16
  • And what does the difference become when `updateBehavior` is not `QOpenGLWindow::NoPartialUpdate`? – Ruslan Sep 07 '22 at 11:59