schr
30th July 2010, 09:46
Hi,
I have no problem getting openGL to work as such, but I cannot use commands such as glGenBuffers (not defined) and it seems to be realted to the openGL version used by QT.
I have tried to probe my context by doing this (after sub classing QWidget):
if(QGLFormat::OpenGL_Version_3_0&&dviewer.context()->format().openGLVersionFlags())
qDebug() << "looks ok..." << dviewer.context()->format().openGLVersionFlags();
That gives
looks ok... 4223
Which makes me think I should be ok with an openGL3 context. (glGenbuffers is version 1.5+).
I am using Fedora 13 and glxinfo says
glxinfo | grep version
server glx version string: 1.4
client glx version string: 1.4
GLX version: 1.4
OpenGL version string: 3.2.0 NVIDIA 195.36.31
OpenGL shading language version string: 1.50 NVIDIA via Cg compiler
For building I use cmake, but I hope that should not make a difference.
What should I be checking - I think the problem is with the headers, but how do I go about directing QT to certain GL headers? I noticed my system gl.h is openGL 1.1 but I am not sure about how I change this and why that is since the driver seems to be running 3.2 (as per glxinfo).
Thanks for any suggestions!
Soren
I have no problem getting openGL to work as such, but I cannot use commands such as glGenBuffers (not defined) and it seems to be realted to the openGL version used by QT.
I have tried to probe my context by doing this (after sub classing QWidget):
if(QGLFormat::OpenGL_Version_3_0&&dviewer.context()->format().openGLVersionFlags())
qDebug() << "looks ok..." << dviewer.context()->format().openGLVersionFlags();
That gives
looks ok... 4223
Which makes me think I should be ok with an openGL3 context. (glGenbuffers is version 1.5+).
I am using Fedora 13 and glxinfo says
glxinfo | grep version
server glx version string: 1.4
client glx version string: 1.4
GLX version: 1.4
OpenGL version string: 3.2.0 NVIDIA 195.36.31
OpenGL shading language version string: 1.50 NVIDIA via Cg compiler
For building I use cmake, but I hope that should not make a difference.
What should I be checking - I think the problem is with the headers, but how do I go about directing QT to certain GL headers? I noticed my system gl.h is openGL 1.1 but I am not sure about how I change this and why that is since the driver seems to be running 3.2 (as per glxinfo).
Thanks for any suggestions!
Soren