From 6fbf9506e6a2f8f7b4465234ca3aaab30bd695f1 Mon Sep 17 00:00:00 2001 From: Jan-Arve Saether Date: Fri, 20 Jul 2012 16:11:45 +0200 Subject: [PATCH] If swapBehavior is TripleBuffer, set WGL_DOUBLE_BUFFER_ARB to TRUE Previously, if the drivers' swap behaviour was single-buffered it would fallthrough (just like DefaultSwapBehavior) and remain single-buffered. Change-Id: I4b93ad7a49094aa992d0b8fb3429c163bbbf655d Reviewed-by: Friedemann Kleint Reviewed-by: Kim M. Kalland --- src/plugins/platforms/windows/qwindowsglcontext.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/platforms/windows/qwindowsglcontext.cpp b/src/plugins/platforms/windows/qwindowsglcontext.cpp index cabc5974eb..4a67130f96 100644 --- a/src/plugins/platforms/windows/qwindowsglcontext.cpp +++ b/src/plugins/platforms/windows/qwindowsglcontext.cpp @@ -384,13 +384,13 @@ static int choosePixelFormat(HDC hdc, iAttributes[i++] = 24; switch (format.swapBehavior()) { case QSurfaceFormat::DefaultSwapBehavior: - case QSurfaceFormat::TripleBuffer: break; case QSurfaceFormat::SingleBuffer: iAttributes[i++] = WGL_DOUBLE_BUFFER_ARB; iAttributes[i++] = FALSE; break; case QSurfaceFormat::DoubleBuffer: + case QSurfaceFormat::TripleBuffer: iAttributes[i++] = WGL_DOUBLE_BUFFER_ARB; iAttributes[i++] = TRUE; break;