QSGContext::defaultSurfaceFormat() should be double-buffered
authorJan-Arve Saether <jan-arve.saether@nokia.com>
Fri, 20 Jul 2012 14:52:31 +0000 (16:52 +0200)
committerQt by Nokia <qt-info@nokia.com>
Mon, 23 Jul 2012 13:45:08 +0000 (15:45 +0200)
The problem was that if the opengl driver is single-buffered
by default it will remain so.
The scene graph really want double-buffered rendering.

Change-Id: Ie80f71276d1dd1304c75170f3ca17e585800e8b8
Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
src/quick/scenegraph/qsgcontext.cpp

index ed6a75d..0d6ddb5 100644 (file)
@@ -378,6 +378,7 @@ QSurfaceFormat QSGContext::defaultSurfaceFormat() const
     QSurfaceFormat format;
     format.setDepthBufferSize(24);
     format.setStencilBufferSize(8);
+    format.setSwapBehavior(QSurfaceFormat::DoubleBuffer);
     return format;
 }