What are the differences between QOpenGLContext and QGLWidget? Which one should I use if I need openGL in my Qt app?
1 Answers
1
votes
what are the differences between QOpenGLContext and QGLWidget?
QOpenGLContext - creates OpenGL context.
QGLWidget - if it has no parent, it is going to create a window, and it will create a new OpenGL context. If it has a parent, it will add a new OpenGL context. Also, it is possible to reuse OpenGL context from other window.
Which one should I use if I need openGL in my Qt app?
If you new in OpenGL, then until you learn more, use QGLWidget to open a window or create an OpenGL widget.