Nominate our 2022 Qt Champions!

Qt 5.3 and OpenGL

  • Hey everyone. I've one question for you. Could you recommend me suitable way for using OpenGL. I was developing my 3D graphics engine in C++/SFML/GLM, but I found that Qt is very suitable for me. As for now I have seen some ways for doing 3d stuff in C++/Qt. For example: QGLWindow class, QWindow + QOpenGLFunctions or other. I don't have any idea which way is best. I am using modern OpenGL (shaders, VBO, VAOs etc).

  • Lifetime Qt Champion

    Hi and welcome to devnet,

    If you don't use any widget related stuff, you can go with QWindow and the QtGui module.

  • I want to have in my app for example button like "Add Box"

  • Lifetime Qt Champion

    The go with QOpenGLWidget and the widget module. QOpenGLWidget is new in Qt 5.4, if you want to stay with the current version it's QGLWidget.

    You can also consider QML

Log in to reply