summaryrefslogtreecommitdiffstats
path: root/src/gui/opengl/qopenglvertexarrayobject.cpp
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@theqtcompany.com>2015-02-10 09:32:16 +0100
committerFrederik Gladhorn <frederik.gladhorn@theqtcompany.com>2015-02-10 09:42:25 +0100
commitfc35f714340d5361231506dfbead132122f59460 (patch)
treefd80498d9417c87b386a011f5849f1e4e48ad3fa /src/gui/opengl/qopenglvertexarrayobject.cpp
parent6389160f04322449c34bd1ecfe53983e3b588943 (diff)
parent0d990b9ca117514fe83f53b39f25d6272304f2fb (diff)
Merge remote-tracking branch 'origin/5.4' into dev
Conflicts: src/3rdparty/harfbuzz-ng/harfbuzz-ng.pro src/gui/image/qimage_conversions.cpp src/gui/opengl/qopenglextensions_p.h src/gui/text/qtextengine.cpp src/network/ssl/qsslsocket_openssl.cpp src/plugins/platforms/eglfs/qeglfshooks_stub.cpp src/plugins/platforms/eglfs/qeglfsscreen.cpp src/plugins/platforms/eglfs/qeglfswindow.cpp src/plugins/platforms/windows/qwindowsfontdatabase.cpp src/plugins/platforms/windows/qwindowsfontdatabase_ft.cpp src/plugins/platforms/windows/qwindowsnativeinterface.cpp src/plugins/platforms/windows/qwindowsscreen.cpp src/plugins/platforms/windows/qwindowswindow.cpp src/plugins/platforms/windows/qwindowswindow.h src/plugins/platforms/xcb/qxcbdrag.h src/widgets/itemviews/qabstractitemview.cpp src/widgets/kernel/qwidget.cpp src/widgets/util/qsystemtrayicon_p.h tests/auto/corelib/itemmodels/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp Thanks to Friedemann Kleint for resolving the qwindowsfontdatabase.cpp conflicts. Change-Id: I937232c30523d5121c195d947d92aec6f129b03e
Diffstat (limited to 'src/gui/opengl/qopenglvertexarrayobject.cpp')
-rw-r--r--src/gui/opengl/qopenglvertexarrayobject.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/gui/opengl/qopenglvertexarrayobject.cpp b/src/gui/opengl/qopenglvertexarrayobject.cpp
index 0fc140b3ef..42bb1a3a52 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")));