From f3b3b014604c070cd1836035e53fffae87f7adda Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Tue, 10 Sep 2013 15:15:56 +0200 Subject: 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 --- examples/opengl/hellowindow/main.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'examples/opengl') 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); -- cgit v1.2.3