Loading OpenGL extensions with Qt5

Arch

I've followed this article on using OpenGL extensions in Qt5 (reference) and following the example code, I get the following error messages: undefined reference to

QOpenGLExtension_ARB_instanced_arrays::QOpenGLExtension_ARB_instanced_arrays()'
undefined reference to `QOpenGLExtension_ARB_instanced_arrays::initializeOpenGLFunctions()'

I've made sure that I have said extension through m_context->hasExtension(..)

Here's my code block (very similar to the article code):

assert(m_context->hasExtension(QByteArrayLiteral("GL_ARB_instanced_arrays")));
QOpenGLExtension_ARB_instanced_arrays* m_instanceFuncs = new QOpenGLExtension_ARB_instanced_arrays();
m_instanceFuncs->initializeOpenGLFunctions();
qDebug("extension loaded");

I'd assume the article would have mentioned other necessary steps.. I'm using Qt 5.3 on Windows 7 with a 4.3 Core context.

Arch

QOpenGLExtensions reside in another submodule than opengl, and so I had to enable it in the pro file like so:

QT += openglextensions

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章