We just spent some time on it. We run Qt 5.2.1 on OSX 10.8 and Ubuntu 14.04 (sorry no WINDOWS ) and created OpenGL3.2 using QGLFormat.
There is no problem in OSX , since all the functions of OpenGL3.2 (for setting uniforms, drawing buffers, etc.) are defined in:
#include "OpenGL/gl3.h"
On Linux , we have to enable BOTH of them:
#include "GL/gl.h" #include "GL/glext.h"
We also tried to inherit the QGLWidget class from QGLFunctions_3_2_Core (this class defines its own copy of glDrawBuffer, etc.), but this was not useful and simply led to segfault:
Program received signal SIGSEGV, Segmentation fault. 0x0000000000407068 in glGetUniformLocation (this=0xbc5820, name=0x407cd0 "view_projection", program=1) at /usr/include/qt5/QtGui/qopenglfunctions_3_2_core.h:1075 1075 return d_2_0_Core->GetUniformLocation(program, name);
We also explored "#define GL_GLEXT_PROTOTYPES 1" above, but it was only useful when we used glcorearb.h (you can download this header online).
source share