diff options
author | Kai Koehne <kai.koehne@qt.io> | 2018-02-13 09:57:29 +0100 |
---|---|---|
committer | Kai Koehne <kai.koehne@qt.io> | 2018-02-13 13:37:15 +0000 |
commit | b733c37522abeb33f2e14f7a8fdefaf15acf42b5 (patch) | |
tree | 728403d52e9194ac4fbb81fa9942909f8cd1f3bd /src/quick/scenegraph/qsgdefaultcontext.cpp | |
parent | ff08272245c099cadd433c8b5d4f98301f5e585b (diff) |
ScenGraph: Prefer printf style logging
This generates more compact code, saving 20480 bytes on disk
(Linux 64 bit, release build).
Change-Id: I73d6d88b7b61b87a5d714e131fcf86ee80c83f38
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/quick/scenegraph/qsgdefaultcontext.cpp')
-rw-r--r-- | src/quick/scenegraph/qsgdefaultcontext.cpp | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/src/quick/scenegraph/qsgdefaultcontext.cpp b/src/quick/scenegraph/qsgdefaultcontext.cpp index be5fec9dab..9a0ac66690 100644 --- a/src/quick/scenegraph/qsgdefaultcontext.cpp +++ b/src/quick/scenegraph/qsgdefaultcontext.cpp @@ -149,20 +149,23 @@ void QSGDefaultContext::renderContextInitialized(QSGRenderContext *renderContext dumped = true; QSurfaceFormat format = openglRenderContext->openglContext()->format(); QOpenGLFunctions *funcs = QOpenGLContext::currentContext()->functions(); - qCDebug(QSG_LOG_INFO) << "R/G/B/A Buffers: " << format.redBufferSize() << format.greenBufferSize() << format.blueBufferSize() << format.alphaBufferSize(); - qCDebug(QSG_LOG_INFO) << "Depth Buffer: " << format.depthBufferSize(); - qCDebug(QSG_LOG_INFO) << "Stencil Buffer: " << format.stencilBufferSize(); - qCDebug(QSG_LOG_INFO) << "Samples: " << format.samples(); - qCDebug(QSG_LOG_INFO) << "GL_VENDOR: " << (const char *) funcs->glGetString(GL_VENDOR); - qCDebug(QSG_LOG_INFO) << "GL_RENDERER: " << (const char *) funcs->glGetString(GL_RENDERER); - qCDebug(QSG_LOG_INFO) << "GL_VERSION: " << (const char *) funcs->glGetString(GL_VERSION); + qCDebug(QSG_LOG_INFO, "R/G/B/A Buffers: %d %d %d %d", format.redBufferSize(), + format.greenBufferSize(), format.blueBufferSize(), format.alphaBufferSize()); + qCDebug(QSG_LOG_INFO, "Depth Buffer: %d", format.depthBufferSize()); + qCDebug(QSG_LOG_INFO, "Stencil Buffer: %d", format.stencilBufferSize()); + qCDebug(QSG_LOG_INFO, "Samples: %d", format.samples()); + qCDebug(QSG_LOG_INFO, "GL_VENDOR: %s", (const char*)funcs->glGetString(GL_VENDOR)); + qCDebug(QSG_LOG_INFO, "GL_RENDERER: %s", + (const char*)funcs->glGetString(GL_RENDERER)); + qCDebug(QSG_LOG_INFO, "GL_VERSION: %s", (const char*)funcs->glGetString(GL_VERSION)); QSet<QByteArray> exts = openglRenderContext->openglContext()->extensions(); QByteArray all; for (const QByteArray &e : qAsConst(exts)) all += ' ' + e; - qCDebug(QSG_LOG_INFO) << "GL_EXTENSIONS: " << all.constData(); - qCDebug(QSG_LOG_INFO) << "Max Texture Size: " << openglRenderContext->maxTextureSize(); - qCDebug(QSG_LOG_INFO) << "Debug context: " << format.testOption(QSurfaceFormat::DebugContext); + qCDebug(QSG_LOG_INFO, "GL_EXTENSIONS: %s", all.constData()); + qCDebug(QSG_LOG_INFO, "Max Texture Size: %d", openglRenderContext->maxTextureSize()); + qCDebug(QSG_LOG_INFO, "Debug context: %s", + format.testOption(QSurfaceFormat::DebugContext) ? "true" : "false"); } m_mutex.unlock(); |