OpenGL 3 not supported with Qt 4.7
I am happy to join this forum today ! I use Qt for a certain time. I recently started to use openGL with it, and now I have a few problems to do it on Linux. On Windows my drivers were up-to-date, and it was working.
But now, I am running on Debian, unstable version. After one night and one kernel compilation, my NVidia driver is finally up-to-date, version 310.32 :D
I know it comes with openGL 3.0 (higher in fact), and Qt 4.7 supports it. I have the last version of the libqt4-opengl-dev package. However I am not able to create a context with openGL >= 2.1.
Did I miss something ? I really want to use GLSL 1.3, not 1.2 :)
Thank for you help.
Oops, exact duplicate of “QGLShaderProgram: shader programs are not supported” with OpenGL 3.2 in 5.0.1 I think... except I am not on Mac.
Edit: Actually I am using Qt 5.0, but the use of the package libqt4-opengl is confusing. If somebody can explain to me how to upgrade the whole thing, thanks.
Ok, I solved my issue thanks to this : http://qt-project.org/wiki/How_to_use_OpenGL_Core_Profile_with_Qt
Maybe it will can help somebody.
ZapB last edited by
Hi, at this point you are probably best using Qt 5. This has better support for modern OpenGL. Qt 5.1 should see a whole bunch of other new stuff to make your life easier when writing Qt + OpenGL 3/4 applications.
Any questions just come back to the forum.
Hi, thank for your answer.
Actually I don't understand what I need to install in order to use openGL with Qt5. I installed Qt Creator (with Qt 5), then I had errors about openGL headers not found. That is why I installed the package libtqt4-opengl-dev, but it seems it was not a good idea. Can you please tell me what I should do to develop with the latest version ?
According to this thread http://qt-project.org/forums/viewthread/22821/#107114 , I compiled Qt by passing in -opengl desktop option to the configure.
I added this new compiled version to the compiler in Qt Creator options. Unfortunately I am not able to choose it for my project : the choice 'Qt version' doesn't appear. According to some researches it might be because my own version doesn't have ABI support, but it does:
ABI: x86-linux-generic-elf-32bit, same as the default version
What I am doing wrong ?