From fdf10003b65c575b633425d6f359a152a4f56f04 Mon Sep 17 00:00:00 2001 From: Gunnar Sletta Date: Wed, 3 Apr 2013 16:05:03 +0200 Subject: The default behavior should be double buffered, not singlebuffered MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Without this, it is not possible to do vsync drawing on NVidia GeForce 210 on Windows 7. Change-Id: I6064826eaa55266344393f50cdf5d17113350255 Reviewed-by: Friedemann Kleint Reviewed-by: Samuel Rødal --- src/plugins/platforms/windows/qwindowsglcontext.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/plugins') diff --git a/src/plugins/platforms/windows/qwindowsglcontext.cpp b/src/plugins/platforms/windows/qwindowsglcontext.cpp index 6f59b33e62..da3e2a6a6a 100644 --- a/src/plugins/platforms/windows/qwindowsglcontext.cpp +++ b/src/plugins/platforms/windows/qwindowsglcontext.cpp @@ -279,7 +279,7 @@ static PIXELFORMATDESCRIPTOR if (format.stereo()) pfd.dwFlags |= PFD_STEREO; - if (format.swapBehavior() == QSurfaceFormat::DoubleBuffer && !isPixmap) + if (format.swapBehavior() != QSurfaceFormat::SingleBuffer && !isPixmap) pfd.dwFlags |= PFD_DOUBLEBUFFER; pfd.cDepthBits = format.depthBufferSize() >= 0 ? format.depthBufferSize() : 32; @@ -389,12 +389,11 @@ static int choosePixelFormat(HDC hdc, iAttributes[i++] = WGL_COLOR_BITS_ARB; iAttributes[i++] = 24; switch (format.swapBehavior()) { - case QSurfaceFormat::DefaultSwapBehavior: - break; case QSurfaceFormat::SingleBuffer: iAttributes[i++] = WGL_DOUBLE_BUFFER_ARB; iAttributes[i++] = FALSE; break; + case QSurfaceFormat::DefaultSwapBehavior: case QSurfaceFormat::DoubleBuffer: case QSurfaceFormat::TripleBuffer: iAttributes[i++] = WGL_DOUBLE_BUFFER_ARB; -- cgit v1.2.3