From dc9e32caeda0278658befb8bb6e944986c021620 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Thu, 28 Nov 2013 22:39:56 +0100 Subject: [PATCH] cocoa: Use swapInterval from QSurfaceFormat xcb and windows already do this. The default value is 1 so the behavior on cocoa does not change when setSwapInterval() is not called. Task-number: QTBUG-31939 Change-Id: Id9d9204c9324f1cc187c6aee4286e7da42583759 Reviewed-by: Gunnar Sletta --- src/plugins/platforms/cocoa/qcocoaglcontext.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/platforms/cocoa/qcocoaglcontext.mm b/src/plugins/platforms/cocoa/qcocoaglcontext.mm index 144144338f..ba204236ee 100644 --- a/src/plugins/platforms/cocoa/qcocoaglcontext.mm +++ b/src/plugins/platforms/cocoa/qcocoaglcontext.mm @@ -143,7 +143,7 @@ QCocoaGLContext::QCocoaGLContext(const QSurfaceFormat &format, QPlatformOpenGLCo [pixelFormat release]; - const GLint interval = 1; + const GLint interval = format.swapInterval() >= 0 ? format.swapInterval() : 1; [m_context setValues:&interval forParameter:NSOpenGLCPSwapInterval]; if (format.alphaBufferSize() > 0) {