summaryrefslogtreecommitdiffstats
path: root/src/platformsupport/cglconvenience/cglconvenience.mm
diff options
context:
space:
mode:
Diffstat (limited to 'src/platformsupport/cglconvenience/cglconvenience.mm')
-rw-r--r--src/platformsupport/cglconvenience/cglconvenience.mm5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/platformsupport/cglconvenience/cglconvenience.mm b/src/platformsupport/cglconvenience/cglconvenience.mm
index 28cde1264d..85add35879 100644
--- a/src/platformsupport/cglconvenience/cglconvenience.mm
+++ b/src/platformsupport/cglconvenience/cglconvenience.mm
@@ -75,8 +75,11 @@ void *qcgl_createNSOpenGLPixelFormat(const QSurfaceFormat &format)
QVector<NSOpenGLPixelFormatAttribute> attrs;
- if (format.swapBehavior() != QSurfaceFormat::SingleBuffer)
+ if (format.swapBehavior() == QSurfaceFormat::DoubleBuffer
+ || format.swapBehavior() == QSurfaceFormat::DefaultSwapBehavior)
attrs.append(NSOpenGLPFADoubleBuffer);
+ else if (format.swapBehavior() == QSurfaceFormat::TripleBuffer)
+ attrs.append(NSOpenGLPFATripleBuffer);
if (format.profile() == QSurfaceFormat::CoreProfile
&& ((format.majorVersion() == 3 && format.minorVersion() >= 2)