Otherwise, use swapBuffers()
This fixes an issue where swapbuffers() did not swap the
"back buffer" to the "front buffer" if we had single-buffered swap
behavior.
This was an issue on Windows 7 with an NVIDIA graphics card that
by default was using single-buffered mode.
Change-Id: If53f54146e4633305be3ad5158565752b6516b59
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
if (framebufferBinding != platformFramebuffer)
qWarning() << "QOpenGLContext::swapBuffers() called with non-default framebuffer object bound";
#endif
-
+ if (surface->format().swapBehavior() == QSurfaceFormat::SingleBuffer)
+ glFlush();
d->platformGLContext->swapBuffers(surfaceHandle);
}