aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph/qsgcontext.cpp
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar.sletta@digia.com>2013-10-31 09:45:57 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-11-05 10:04:45 +0100
commit2a1fc76f4ed1680e78b740c47fa736768aed82e9 (patch)
treea4390b6324d995808ad7441e7f5d66befa9db01f /src/quick/scenegraph/qsgcontext.cpp
parent1cd51d23446ba8945b14522157af9a4d96abb6dd (diff)
Added QSG_INFO=1 environment variable to spit out graphics info
Change-Id: I12bc0bc475b3e99185aefcd58eef5a0fb5e9852e Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Diffstat (limited to 'src/quick/scenegraph/qsgcontext.cpp')
-rw-r--r--src/quick/scenegraph/qsgcontext.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/quick/scenegraph/qsgcontext.cpp b/src/quick/scenegraph/qsgcontext.cpp
index c6dbf350b6..4ccbaca08e 100644
--- a/src/quick/scenegraph/qsgcontext.cpp
+++ b/src/quick/scenegraph/qsgcontext.cpp
@@ -206,6 +206,16 @@ void QSGContext::renderContextInitialized(QSGRenderContext *renderContext)
d->antialiasingMethod = VertexAntialiasing;
}
}
+
+ static bool dumped = false;
+ if (!dumped && qEnvironmentVariableIsSet("QSG_INFO")) {
+ dumped = true;
+ 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_EXTENSIONS:\n " << QByteArray((const char *) glGetString(GL_EXTENSIONS)).replace(" ", "\n ").constData();
+ }
+
d->mutex.unlock();
}