PDA

View Full Version : QGLFunctions missing some functions.



Zamaster
28th May 2014, 20:29
I’m trying to write a Qt + OpenGL desktop application, and I find it seems to be missing an important function that I need. In this case its VertexAttribDivisor. Is this because Qt only implements OpenGL ES? Thanks!

ChrisW67
28th May 2014, 22:40
You are not including/inheriting the appropriate versioned OpenGL functions header for OpenGL 3.3 or later, or your machine does not have OpenGL 3.3 capable drivers/hardware.
See the OpenGL example and use QOpenGLFunctions_3_3.

Zamaster
28th May 2014, 22:44
Does this exclude "QGLFunctions"?

ChrisW67
29th May 2014, 10:35
As the docs say, QGLFunctions (http://qt-project.org/doc/qt-5/qglfunctions.html) provides a wrapper for OpenGL/ES 2.0 and is deprecated in Qt 5. In Qt 5 the equivalent is QOpenGLFunctions (http://qt-project.org/doc/qt-5/qopenglfunctions.html). Support for other OpenGL versions is described here (http://qt-project.org/doc/qt-5/qtgui-index.html#opengl-and-opengl-es-integration).

In Qt4 you use the OpenGl library directly to get other OpenGL versions.