aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquickitemlayer/tst_qquickitemlayer.cpp
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@digia.com>2014-06-26 15:08:47 +0200
committerLaszlo Agocs <laszlo.agocs@digia.com>2014-07-01 14:20:49 +0200
commit08f9b552c3735e15f9bf58ab5908652b06e47e88 (patch)
treec36ba328ff34a49af32383dace76be6b4ccd2145 /tests/auto/quick/qquickitemlayer/tst_qquickitemlayer.cpp
parent8adc7bad2281596461cbf9557d2ca071113e095d (diff)
Avoid direct GL calls in Qt Quick examples and tests
Change-Id: I204a5513708aeff5cae00d06d4f0c27c20a13ace Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Diffstat (limited to 'tests/auto/quick/qquickitemlayer/tst_qquickitemlayer.cpp')
-rw-r--r--tests/auto/quick/qquickitemlayer/tst_qquickitemlayer.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/auto/quick/qquickitemlayer/tst_qquickitemlayer.cpp b/tests/auto/quick/qquickitemlayer/tst_qquickitemlayer.cpp
index b5980929a6..bd7b89b104 100644
--- a/tests/auto/quick/qquickitemlayer/tst_qquickitemlayer.cpp
+++ b/tests/auto/quick/qquickitemlayer/tst_qquickitemlayer.cpp
@@ -44,6 +44,7 @@
#include <QtQuick/qquickitem.h>
#include <QtQuick/qquickview.h>
#include <QtGui/qopenglcontext.h>
+#include <QtGui/qopenglfunctions.h>
#include "../../shared/util.h"
@@ -107,13 +108,13 @@ tst_QQuickItemLayer::tst_QQuickItemLayer()
window.create();
context.create();
context.makeCurrent(&window);
- const char *vendor = (const char *)glGetString(GL_VENDOR);
- const char *renderer = (const char *)glGetString(GL_RENDERER);
+ const char *vendor = (const char *)context.functions()->glGetString(GL_VENDOR);
+ const char *renderer = (const char *)context.functions()->glGetString(GL_RENDERER);
m_isMesaSoftwareRasterizer = strcmp(vendor, "Mesa Project") == 0
&& strcmp(renderer, "Software Rasterizer") == 0;
if (m_isMesaSoftwareRasterizer) {
// Expects format: <OpenGL version> Mesa <Mesa version>[-devel] [...]
- const char *version = (const char *)glGetString(GL_VERSION);
+ const char *version = (const char *)context.functions()->glGetString(GL_VERSION);
QList<QByteArray> list = QByteArray(version).split(' ');
if (list.size() >= 3) {
list = list.at(2).split('-').at(0).split('.');