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>
This commit is contained in:
Laszlo Agocs 2013-09-10 15:15:56 +02:00 committed by The Qt Project
parent 3260dfc0be
commit f3b3b01460

View File

@ -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);