If the GL driver is singlebuffered, reflect that in QSurfaceFormat
authorJan-Arve Saether <jan-arve.saether@nokia.com>
Fri, 20 Jul 2012 14:11:45 +0000 (16:11 +0200)
committerQt by Nokia <qt-info@nokia.com>
Mon, 23 Jul 2012 17:57:07 +0000 (19:57 +0200)
Change-Id: Iafed64d0a35f8d49357f147c8b7b4c0e9f4b9173
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
src/plugins/platforms/windows/qwindowsglcontext.cpp

index 4a67130..b93ead6 100644 (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]);