OpenGL in Qt 5.1
-
wrote on 4 Jul 2013, 22:10 last edited by
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
Martin -
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.
-
wrote on 5 Jul 2013, 10:08 last edited by
No,
qt-windows-opensource-5.1.0-msvc2012_opengl-x86_64-offline.exe
fca8f6ff98ee4d01a6c8fcfef8e339f6BTW I've reported it as a bug:
https://bugreports.qt-project.org/browse/QTBUG-32243
1/3