From 08f9b552c3735e15f9bf58ab5908652b06e47e88 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Thu, 26 Jun 2014 15:08:47 +0200 Subject: Avoid direct GL calls in Qt Quick examples and tests Change-Id: I204a5513708aeff5cae00d06d4f0c27c20a13ace Reviewed-by: Friedemann Kleint Reviewed-by: Gunnar Sletta --- tests/auto/quick/qquickitemlayer/tst_qquickitemlayer.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'tests/auto/quick/qquickitemlayer/tst_qquickitemlayer.cpp') 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 #include #include +#include #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: Mesa [-devel] [...] - const char *version = (const char *)glGetString(GL_VERSION); + const char *version = (const char *)context.functions()->glGetString(GL_VERSION); QList list = QByteArray(version).split(' '); if (list.size() >= 3) { list = list.at(2).split('-').at(0).split('.'); -- cgit v1.2.3