OpenGL in Qt 5.1
Hi, I'm little bit confused about OpenGL in Qt 5.1 (VS 2012 x64).
Now I'm using multiple QGLWidgets (shared context, core profile 3.3) and the deprecated classes for shaders (QGLShaderProgram) + GLEW library. Now I'm thinking about rewriting the app using new Qt OpenGL support.
First I'd tried to replace QGLShaderProgram with the QOpenGLShaderProgram, but I have a problem with my geometry shader. The app is working correctly with QGLShaderProgram, but not with the QOpenglShaderProgram. When there is a geometry shader in usage, glGetError() return invalid operation (no error during compilation and linking).
Thats really strange. Could it be a conflict between GLEW and the QtOpenglFunction table?
Second question is about the QWindow class. Should I replace the QGLWidgets with QWindow? There are about 3 QGLWidgets in my app (one central and two in QDockWidget). They share the context (textures, shaders, ...)
Thanks for help
Possibly you are using an Angle build of Qt and trying to use OpenGL >2.0 functions? You probably need to compile Qt with "-opengl desktop" option.
BTW I've reported it as a bug: