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 <gunnar.sletta@digia.com>
This commit is contained in:
parent
7308af8ca7
commit
dc9e32caed
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user