diff options
author | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-06-03 10:04:54 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-06-04 07:03:54 +0000 |
commit | 926303a9f8946a2ff36bfcb57d035b9c870646c0 (patch) | |
tree | ff30fea04e2305143a782ad9abf85c0663568d2a /tools/qml | |
parent | d910065eea4481929dbc86bb3f5e3f1f5c15484e (diff) |
qml: Add options to control the GL renderer.
Task-number: QTBUG-46030
Change-Id: I5af5a0ef267444d85e8da6df196229ad8199c00f
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Diffstat (limited to 'tools/qml')
-rw-r--r-- | tools/qml/main.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/qml/main.cpp b/tools/qml/main.cpp index 7e59810cd8..54e3810572 100644 --- a/tools/qml/main.cpp +++ b/tools/qml/main.cpp @@ -274,6 +274,10 @@ void printUsage() printf("\t-f [file] .................... Load the given file as a QML file.\n"); printf("\t-config [file] ............... Load the given file as the configuration file.\n"); printf("\t-- ........................... Arguments after this one are ignored by the launcher, but may be used within the QML application.\n"); + printf("\tGL options:\n"); + printf("\t-desktop.......................Force use of desktop GL (AA_UseDesktopOpenGL)\n"); + printf("\t-gles..........................Force use of GLES (AA_UseOpenGLES)\n"); + printf("\t-software......................Force use of software rendering (AA_UseOpenGLES)\n"); printf("\tDebugging options:\n"); printf("\t-verbose ..................... Print information about what qml is doing, like specific file urls being loaded.\n"); printf("\t-translation [file] .......... Load the given file as the translations file.\n"); @@ -439,6 +443,12 @@ int main(int argc, char *argv[]) continue;//Invalid usage, but just ignore it dummyDir = argList[i+1]; i++; + } else if (arg == QLatin1String("-gles")) { + QCoreApplication::setAttribute(Qt::AA_UseOpenGLES); + } else if (arg == QLatin1String("-software")) { + QCoreApplication::setAttribute(Qt::AA_UseSoftwareOpenGL); + } else if (arg == QLatin1String("-desktop")) { + QCoreApplication::setAttribute(Qt::AA_UseDesktopOpenGL); } else { //If it ends in .qml, treat it as a file. Else ignore it if (arg.endsWith(".qml")) |