Use glFlush() if swapBehavior is single-buffered
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>
This commit is contained in:
parent
0e3dcf3624
commit
8632b26285
@ -567,7 +567,8 @@ void QOpenGLContext::swapBuffers(QSurface *surface)
|
|||||||
if (framebufferBinding != platformFramebuffer)
|
if (framebufferBinding != platformFramebuffer)
|
||||||
qWarning() << "QOpenGLContext::swapBuffers() called with non-default framebuffer object bound";
|
qWarning() << "QOpenGLContext::swapBuffers() called with non-default framebuffer object bound";
|
||||||
#endif
|
#endif
|
||||||
|
if (surface->format().swapBehavior() == QSurfaceFormat::SingleBuffer)
|
||||||
|
glFlush();
|
||||||
d->platformGLContext->swapBuffers(surfaceHandle);
|
d->platformGLContext->swapBuffers(surfaceHandle);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user