diff options
author | Laszlo Agocs <laszlo.agocs@digia.com> | 2014-03-20 15:47:22 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-03-24 22:27:21 +0100 |
commit | 76dd99c448ae69cb12a0465facc5dd743b94e624 (patch) | |
tree | 785288589e8645a42be240960e75a6ff718faf64 /examples/quick/controls/gallery | |
parent | 51156e412b2f91dbbf8c0b6055e6ab4c29370d8a (diff) | |
download | qtquickcontrols-76dd99c448ae69cb12a0465facc5dd743b94e624.tar.gz |
Fix shaders for OpenGL core profiles
Add also a --coreprofile command-line parameter to the gallery and
systemdialogs examples to allow testing Quick Controls with an OpenGL 3.2+
core profile.
This depends on the new features introduced to qtdeclarative in
I75a47182 and I41b513e9.
Change-Id: I408263a108a71df221943915849a4c3e18e0d3e4
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Diffstat (limited to 'examples/quick/controls/gallery')
-rw-r--r-- | examples/quick/controls/gallery/src/main.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/examples/quick/controls/gallery/src/main.cpp b/examples/quick/controls/gallery/src/main.cpp index a757f485..b0d12b85 100644 --- a/examples/quick/controls/gallery/src/main.cpp +++ b/examples/quick/controls/gallery/src/main.cpp @@ -40,10 +40,18 @@ #include "qtquickcontrolsapplication.h" #include <QtQml/QQmlApplicationEngine> +#include <QtGui/QSurfaceFormat> +#include <QtQuick/QQuickWindow> int main(int argc, char *argv[]) { QtQuickControlsApplication app(argc, argv); + if (QCoreApplication::arguments().contains(QLatin1String("--coreprofile"))) { + QSurfaceFormat fmt = QQuickWindow::defaultFormat(); + fmt.setVersion(4, 4); + fmt.setProfile(QSurfaceFormat::CoreProfile); + QQuickWindow::setDefaultFormat(fmt); + } QQmlApplicationEngine engine(QUrl("qrc:/main.qml")); return app.exec(); } |