diff options
author | Frederik Gladhorn <[email protected]> | 2015-01-29 10:02:38 +0100 |
---|---|---|
committer | Frederik Gladhorn <[email protected]> | 2015-01-29 10:05:01 +0100 |
commit | 55162dae7e5e40bd86b1a6d2c5d5009660159d39 (patch) | |
tree | 30b54dfc19cb83ac0edb795bf206b51edd805c97 /src/gui/opengl/qopenglvertexarrayobject.cpp | |
parent | 3527fd62c2705a0292458dd751d9d7f8d4be357f (diff) | |
parent | 6430d6e3ec31afabe0e674397088dd6d9e056195 (diff) |
Merge remote-tracking branch 'origin/5.4.1' into 5.4
Change-Id: Idadb5639da6e55e7ac8cc30eedf76d147d8d5d23
Diffstat (limited to 'src/gui/opengl/qopenglvertexarrayobject.cpp')
-rw-r--r-- | src/gui/opengl/qopenglvertexarrayobject.cpp | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/gui/opengl/qopenglvertexarrayobject.cpp b/src/gui/opengl/qopenglvertexarrayobject.cpp index 5520dfed08c..d3eadf9ae12 100644 --- a/src/gui/opengl/qopenglvertexarrayobject.cpp +++ b/src/gui/opengl/qopenglvertexarrayobject.cpp @@ -35,12 +35,12 @@ #include <QtCore/private/qobject_p.h> #include <QtGui/qopenglcontext.h> -#include <QtGui/qopenglfunctions.h> #include <QtGui/qoffscreensurface.h> #include <QtGui/qopenglfunctions_3_0.h> #include <QtGui/qopenglfunctions_3_2_core.h> +#include <private/qopenglextensions_p.h> #include <private/qopenglvertexarrayobject_p.h> QT_BEGIN_NAMESPACE @@ -56,16 +56,14 @@ void qtInitializeVertexArrayObjectHelper(QOpenGLVertexArrayObjectHelper *helper, bool tryARB = true; if (context->isOpenGLES()) { -#ifdef QT_OPENGL_ES_3 if (context->format().majorVersion() >= 3) { - helper->GenVertexArrays = ::glGenVertexArrays; - helper->DeleteVertexArrays = ::glDeleteVertexArrays; - helper->BindVertexArray = ::glBindVertexArray; - helper->IsVertexArray = ::glIsVertexArray; + QOpenGLES3Helper *es3 = static_cast<QOpenGLExtensions *>(context->functions())->gles3Helper(); + helper->GenVertexArrays = es3->GenVertexArrays; + helper->DeleteVertexArrays = es3->DeleteVertexArrays; + helper->BindVertexArray = es3->BindVertexArray; + helper->IsVertexArray = es3->IsVertexArray; tryARB = false; - } else -#endif - if (context->hasExtension(QByteArrayLiteral("GL_OES_vertex_array_object"))) { + } else if (context->hasExtension(QByteArrayLiteral("GL_OES_vertex_array_object"))) { helper->GenVertexArrays = reinterpret_cast<QOpenGLVertexArrayObjectHelper::qt_GenVertexArrays_t>(context->getProcAddress(QByteArrayLiteral("glGenVertexArraysOES"))); helper->DeleteVertexArrays = reinterpret_cast<QOpenGLVertexArrayObjectHelper::qt_DeleteVertexArrays_t>(context->getProcAddress(QByteArrayLiteral("glDeleteVertexArraysOES"))); helper->BindVertexArray = reinterpret_cast<QOpenGLVertexArrayObjectHelper::qt_BindVertexArray_t>(context->getProcAddress(QByteArrayLiteral("glBindVertexArrayOES"))); |