aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph/qsgcontext.cpp
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@digia.com>2014-04-08 15:05:21 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-05-23 12:23:09 +0200
commite950557e1133e8aac65a453597ab35400a5b9a10 (patch)
tree835e04f12a584274cec65efaa6071001247417ee /src/quick/scenegraph/qsgcontext.cpp
parent8a28462c13907800caf44c16580e0b2a2ee99f69 (diff)
Avoid direct GL calls in Quick
Change-Id: I9b8673fb3292c9d5ad2f9e8e63f56dc661699be6 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Diffstat (limited to 'src/quick/scenegraph/qsgcontext.cpp')
-rw-r--r--src/quick/scenegraph/qsgcontext.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/quick/scenegraph/qsgcontext.cpp b/src/quick/scenegraph/qsgcontext.cpp
index 64506d1c26..99b52a65cb 100644
--- a/src/quick/scenegraph/qsgcontext.cpp
+++ b/src/quick/scenegraph/qsgcontext.cpp
@@ -207,13 +207,14 @@ void QSGContext::renderContextInitialized(QSGRenderContext *renderContext)
if (!dumped && qEnvironmentVariableIsSet("QSG_INFO")) {
dumped = true;
QSurfaceFormat format = renderContext->openglContext()->format();
+ QOpenGLFunctions *funcs = QOpenGLContext::currentContext()->functions();
qDebug() << "R/G/B/A Buffers: " << format.redBufferSize() << format.greenBufferSize() << format.blueBufferSize() << format.alphaBufferSize();
qDebug() << "Depth Buffer: " << format.depthBufferSize();
qDebug() << "Stencil Buffer: " << format.stencilBufferSize();
qDebug() << "Samples: " << format.samples();
- qDebug() << "GL_VENDOR: " << (const char *) glGetString(GL_VENDOR);
- qDebug() << "GL_RENDERER: " << (const char *) glGetString(GL_RENDERER);
- qDebug() << "GL_VERSION: " << (const char *) glGetString(GL_VERSION);
+ qDebug() << "GL_VENDOR: " << (const char *) funcs->glGetString(GL_VENDOR);
+ qDebug() << "GL_RENDERER: " << (const char *) funcs->glGetString(GL_RENDERER);
+ qDebug() << "GL_VERSION: " << (const char *) funcs->glGetString(GL_VERSION);
QSet<QByteArray> exts = renderContext->openglContext()->extensions();
QByteArray all; foreach (const QByteArray &e, exts) all += ' ' + e;
qDebug() << "GL_EXTENSIONS: " << all.constData();
@@ -441,10 +442,11 @@ void QSGRenderContext::initialize(QOpenGLContext *context)
m_sg->renderContextInitialized(this);
#ifdef Q_OS_LINUX
- const char *vendor = (const char *) glGetString(GL_VENDOR);
+ QOpenGLFunctions *funcs = QOpenGLContext::currentContext()->functions();
+ const char *vendor = (const char *) funcs->glGetString(GL_VENDOR);
if (strstr(vendor, "nouveau"))
m_brokenIBOs = true;
- const char *renderer = (const char *) glGetString(GL_RENDERER);
+ const char *renderer = (const char *) funcs->glGetString(GL_RENDERER);
if (strstr(renderer, "llvmpipe"))
m_serializedRender = true;
if (strstr(vendor, "Hisilicon Technologies") && strstr(renderer, "Immersion.16"))