Enabling the OpenGL Kernel Profile in QT4 in OS X

I just switched to Lion, and I'm trying to get some coding practice with GLSL 1.50, however I cannot get my code to work above OpenGL 2.1, so I get the "version" 150 "not supported" error when trying to compile my shaders.

The setup is as follows: I am using 2 x 2.8Ghz Quad-Core Xeons with the GeForce 8800GT in OS X 10.7.2 and using QT creator 2.3 and QT version 4.7. To set up my OpenGL context, I use a class derived from QGLWidget. Since I plan on having a second QGLWidget with a similar setup, my goal was to change the default format for my QGLWidget (s) as follows:

QApplication app(argc, argv); QGLFormat f; f.setVersion(3, 2); f.setProfile(QGLFormat::CoreProfile); QGLFormat::setDefaultFormat(f); GUIVolumePanel* pvp = new GUIVolumePanel(prc, x, y, z); std::tr1::shared_ptr<GUIMainWindow> prog(new GUIMainWindow(pvp)); 

However, this does not seem to affect my OpenGL context, and I find it difficult to figure out why.

+4
source share
1 answer

I opened it and found

http://developer.qt.nokia.com/forums/viewthread/8047

which makes me think 4.7 does not yet support it. There is some code that can make you work like a job. You can also try qt 4.8 rc.

Given that Leo came out after qt 4.7 came out, I did not expect him to work right away.

0
source

All Articles