Qt 4.6 OpenGL GLSL
I am trying to find both NeHe tutorials for Qt, which are all in GLSL. Because let's face it, OpenGL is dead in the old days and now Shaders is the only way. And as of Qt-4.6, they introduced the QMatrix4x4, QVector3 and Shader classes. But I cannot find tutorials for this.
All I find everyone is using crappy SDL and / or GLUT (which are just plain useless).
a source to share
Porting OpenGL code between languages ββand GUIs shouldn't change the code much. For example, when switching from GLUT to Qt, you move the GLUT transform code into the resizeGL QGLWidget function and the GLUT display function into the QGLWidget paintGL function. This is the biggest change coming from GLUT to Qt beyond customization.
Also, everything is heavily related to small utilities and bonus classes. Basically you should be looking for a class when you need it. Like "I'm going to use a shader, so let's see if Qt has helper classes." You will find a class called QGLShader that seems to help, but it has no documentation, so you should try another class that might have documentation, such as QGLShaderProgram.
http://doc.trolltech.com/4.6/qglshaderprogram.html#details
Going down to the details, it gives you an example / tutorial on how to use it and the QGLShader class.
For smaller classes like vectors and matrices, you just need to read their functional documentation, which is straightforward enough. Vectors, for example, are of the QVector3 class. I can look at this class page and see that it has the normal functionality that I would expect in a vector class like normalization, append, etc. A tutorial on something this simple didn't really help me.
In my experience, this is the standard way of using wrappers in OpenGL. For example, JOGL has a large Texture class which is useful for the io texture. When I needed to add textures, I found it just by looking for "texture" in the javadoc.
a source to share