Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Qt 4.x/5.x and OpenGL for Desktop Gui application: What module to choose?

Tags:

c++

qt

opengl

I am starting a new GUI application project using Qt and OpenGL for Linux/Windows desktops. My assumptions so far: use Qt GUI (C++ ... not QML/QtQuick 2) with OpenGL 4.1 or higher (requirement). After some reading, I am completely lost about what path to choose. What path will keep my application future-proof in term of support and libraries.

Qt 4.x or Qt 5.x? Standard OpenGL or QGL or QOpenGL or QtOpenGL wrappers? QWidget/QGLWidget (Qt 4.x) or QWindow (Qt 5.x)?

The application is intended to run in desktop environment and will do a lot of file (geometry) opening/saving, instanced 3D painting and some imaging. Could someone point me out to the best combination to choose with some explanation if possible?

Sean Harmer presentation on Qt 5 and OpenGL did answer some parts of my questions but I was a bit lost when he started using QML and QtQuick 2. I felt like QOpenGL was a lightweighted version to be used with QtQuick 2. Correct me If I am wrong on that please.

like image 207
Maiss Avatar asked Dec 18 '12 08:12

Maiss


1 Answers

Qt 5.0 is still in beta, therefore if your project is serious, you should go with qt 4.8, because that is the latest stable release. However, if you must have some Qt 5.0 features, then you have no other choice but to go with 5.0.

Since you chosen Qt, you should stick to it. That means using QtOpenGL. That doesn't mean you are not going to use standard OpenGL. QtOpenGL provides you API to simplify some OpenGL calls, and make them more object oriented. After all, OpenGL is set of C functions, not set of c++ classes.

like image 151
BЈовић Avatar answered Nov 09 '22 23:11

BЈовић