Qt4 OpenGL Tutorials to Qt5
I'm upgrading our Qt4 software to Qt5. We're using OpenGL 3.1 (and GLEW) and we prefer not to use the new QOpenGLFunctions_3_1 since that would require a large refactor of our codebase (5+ years old, has fixed function pipeline).
What I'm looking for is an example of the Qt4 OpenGL tutorials turned into Qt5 or the Qt5 versions of the Qt5 OpenGL tutorials.
I'm specifically looking for the Qt5 version of http://doc.qt.io/qt-4.8/qt-opengl-hellogl-example.html (btw, the docs are missing QtLogo.h/cpp which can be acquired from https://github.com/openwebos/qt/tree/master/examples/opengl/shared) or the Qt4 version of http://doc.qt.io/qt-5/qtgui-openglwindow-example.html
Hi and welcome to devnet,
Do you mean the Hello GL2 example ?
I learned OpenGL with this: http://doc.qt.io/qt-5/qtopengl-cube-example.html
btw. why do you want to upgrade to qt5 if qt4 works?? And what does not work under qt5?? As far as i know older code should always run with higher qt versions.
@QT-static-prgm "As far as i know older code should always run with higher qt versions" - this is only guaranteed for minor version changes like 5.7 -> 5.8 (actually it is only guaranteed for 5.7.0 -> 5.7.1, but usually it works for 5.7 -> 5.8). For major version changes like 4 -> 5 this is not the case.
@SGaist bah. ty. how do i set this question as 'solved' and mark your answer as what i wanted.