diff options
author | Gunnar Sletta <gunnar.sletta@digia.com> | 2013-04-03 16:05:03 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-04-05 11:05:25 +0200 |
commit | fdf10003b65c575b633425d6f359a152a4f56f04 (patch) | |
tree | 4b95c132b85adac2ab6a34bdb651c0b84b2e6ed3 /src/plugins | |
parent | b3a505dc924fb26fcf68bb2016b6f5ea206a946b (diff) |
The default behavior should be double buffered, not singlebuffered
Without this, it is not possible to do vsync drawing on NVidia
GeForce 210 on Windows 7.
Change-Id: I6064826eaa55266344393f50cdf5d17113350255
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/platforms/windows/qwindowsglcontext.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
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; |