If the GL driver is singlebuffered, reflect that in QSurfaceFormat

Change-Id: Iafed64d0a35f8d49357f147c8b7b4c0e9f4b9173
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
This commit is contained in:
Jan-Arve Saether 2012-07-20 16:11:45 +02:00 committed by Qt by Nokia
parent 6fbf9506e6
commit 4d573117c4

View File

@ -526,8 +526,7 @@ static QSurfaceFormat
qErrnoWarning("%s: wglGetPixelFormatAttribIVARB() failed for basic parameters.", __FUNCTION__);
return result;
}
if (iValues[0])
result.setSwapBehavior(QSurfaceFormat::DoubleBuffer);
result.setSwapBehavior(iValues[0] ? QSurfaceFormat::DoubleBuffer : QSurfaceFormat::SingleBuffer);
result.setDepthBufferSize(iValues[1]);
result.setRedBufferSize(iValues[3]);
result.setGreenBufferSize(iValues[4]);