OpenGL 3 Example with Qt 4.7 ?
-
Hi,
I want to migrate my OpenGL 2.1 Qt application into a OpenGL 3.x application.
After setting:QGLFormat fmt;
fmt.setProfile(QGLFormat::CoreProfile);glGetString(GL_VERSION) still reports a 2.1 context.
After an additional:
fmt.setVersion(3,2);
glGetString(GL_VERSION) reports a 3.2 context but the application crashes.
Does anyone know a real 3.x OpenGL application example with Qt 4.7 or older?
Thanks
Marcus -
I don't know if this is any help, but certain person had this kind of problem with Qt Jambi.
"http://strattonbrazil.blogspot.com/2010/10/incorporating-scala-java-sbt-jogl-qt.html":http://strattonbrazil.blogspot.com/2010/10/incorporating-scala-java-sbt-jogl-qt.html
[edit: fixed link / chetankjain]
-
Hi, What is your dev platform ???
How do you link OpenGL, and include headers?
Are you shour that you do not use deprecated functions? (this should and must crash your app!)
Can you build and run some OGL 3 sample apps ? Like from g-truc.net ?
-
Hi,
my dev platform is Windows7 MSVS2008.
Yes, I even finished the migration to OpenGL core profile.
I use now GLFW for the context creation and the gui interface.
For the OpenGL I use gl3w for the GL3 header and the function binding.
Of course GLFW is not an Qt replacement but at least I can check now
my core profile compatibility.
I still look for a Qt 4.7 example that creates a valid GL3 core profile app.
Regards
Marcus -
Tried it on my pc on some of the opengl example from qt sources and it creates the context ok and application runs normal also glGetString(GL_VERSION) reports a 3.3 context
(had to use QGLFormat::CompatibilityProfile on some examples but even with QGLFormat::CoreProfile the application runed but some textures where missing) try and set your profile to CompatibilityProfile and see if it still crashes[quote author="hudrima1" date="1287059793"]Hi,
I want to migrate my OpenGL 2.1 Qt application into a OpenGL 3.x application.
After setting:QGLFormat fmt;
fmt.setProfile(QGLFormat::CoreProfile);glGetString(GL_VERSION) still reports a 2.1 context.
After an additional:
fmt.setVersion(3,2);
glGetString(GL_VERSION) reports a 3.2 context but the application crashes.
Does anyone know a real 3.x OpenGL application example with Qt 4.7 or older?
Thanks
Marcus[/quote]