More graceful handling of QSurfaceFormat::samples() with GLX.

Earlier, if we asked for say 16 and the implementation only handled 4,
we defaulted to 0 (no antialiasing). Now, we instead try a
progressively lower number until we find a match.

Task-number: QTBUG-22669
Change-Id: I3d89f2a302f9c6195e2d43827006fd015d981ce7
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
bb10
Samuel Rødal 2012-02-10 10:18:03 +01:00 committed by Qt by Nokia
parent a541fd4d71
commit 7dca7c3c57
1 changed files with 1 additions and 1 deletions

View File

@ -264,7 +264,7 @@ QSurfaceFormat qglx_reduceSurfaceFormat(const QSurfaceFormat &format, bool *redu
} else if (retFormat.blueBufferSize() > 1) {
retFormat.setBlueBufferSize(1);
} else if (retFormat.samples() > 1) {
retFormat.setSamples(0);
retFormat.setSamples(qMin(retFormat.samples() / 2, 16));
} else if (retFormat.stereo()) {
retFormat.setStereo(false);
}else if (retFormat.stencilBufferSize() > 0) {