From 83fb4f6743860bfb746e6243aad00513d498db4f Mon Sep 17 00:00:00 2001 From: Paul Olav Tvete Date: Tue, 16 Jun 2020 17:03:47 +0200 Subject: Clean up QT_CONFIG(opengl) Accelerated graphics is now possible without OpenGL support. With this change, a Qt build with -no-opengl can still run Qt Quick with a Vulkan, Metal, or Direct3D backend. Fixes: QTBUG-84027 Change-Id: Ib63c733d28cfdf7de16b138df136fa7628e1747b Reviewed-by: Laszlo Agocs --- tools/qmlscene/main.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'tools/qmlscene') diff --git a/tools/qmlscene/main.cpp b/tools/qmlscene/main.cpp index 2824ba35fa..449e682b4e 100644 --- a/tools/qmlscene/main.cpp +++ b/tools/qmlscene/main.cpp @@ -47,7 +47,6 @@ #include #include -#include #ifdef QT_WIDGETS_LIB #include @@ -351,8 +350,7 @@ static void usage() puts(" --transparent .................... Make the window transparent"); puts(" --multisample .................... Enable multisampling (OpenGL anti-aliasing)"); puts(" --core-profile ................... Request a core profile OpenGL context"); - puts(" --rhi [vulkan|metal|d3d11|gl] .... Use the Qt graphics abstraction (RHI) instead of OpenGL directly.\n" - " .... Backend has platform specific defaults. Specify to override."); + puts(" --rhi [vulkan|metal|d3d11|gl] .... Specify backend for the Qt graphics abstraction (RHI).\n"); puts(" --no-version-detection ........... Do not try to detect the version of the .qml file"); puts(" --slow-animations ................ Run all animations in slow motion"); puts(" --resize-to-root ................. Resize the window to the size of the root item"); @@ -390,10 +388,6 @@ static void setWindowTitle(bool verbose, const QObject *topLevel, QWindow *windo if (verbose) { newTitle += QLatin1String(" [Qt ") + QLatin1String(QT_VERSION_STR) + QLatin1Char(' ') + QGuiApplication::platformName() + QLatin1Char(' '); -#if QT_CONFIG(opengl) - newTitle += QOpenGLContext::openGLModuleType() == QOpenGLContext::LibGL - ? QLatin1String("GL") : QLatin1String("GLES"); -#endif newTitle += QLatin1Char(']'); } if (oldTitle != newTitle) @@ -573,7 +567,6 @@ int main(int argc, char ** argv) QUnifiedTimer::instance()->setSlowModeEnabled(options.slowAnimations); if (options.rhi) { - qputenv("QSG_RHI", "1"); if (options.rhiBackendSet) qputenv("QSG_RHI_BACKEND", options.rhiBackend.toLatin1()); else -- cgit v1.2.3