diff options
author | Laszlo Agocs <laszlo.agocs@digia.com> | 2013-09-10 15:15:56 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-09-10 16:11:15 +0200 |
commit | f3b3b014604c070cd1836035e53fffae87f7adda (patch) | |
tree | 093a796444207f633e529815a5469262d2f83677 /examples | |
parent | 3260dfc0be3e41cec4a444b9b5841ac468332d50 (diff) |
hellowindow: Request multisampling only when told so
Similarly to qmlscene, multisampling will only be requested when
passing --multisample on the command line. This is useful because (1)
multisampling is not really needed by this app and (2) it helps with
broken drivers that advertise MSAA configs but break when using them.
Change-Id: I50ff0db80843f488899901ab796eee588b62078b
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/opengl/hellowindow/main.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/opengl/hellowindow/main.cpp b/examples/opengl/hellowindow/main.cpp index 4c5c208b14..d6802a8e20 100644 --- a/examples/opengl/hellowindow/main.cpp +++ b/examples/opengl/hellowindow/main.cpp @@ -61,7 +61,8 @@ int main(int argc, char *argv[]) QSurfaceFormat format; format.setDepthBufferSize(16); - format.setSamples(4); + if (QGuiApplication::arguments().contains(QStringLiteral("--multisample"))) + format.setSamples(4); QPoint center = QPoint(screenGeometry.center().x(), screenGeometry.top() + 80); QSize windowSize(400, 320); |