diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2018-08-27 12:43:50 +0200 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2018-08-31 12:35:47 +0000 |
commit | 2664e843223e558a781d00191b7dffd962aa5618 (patch) | |
tree | 22ad6c41a85f149087ed96bf5a019371ade4750a /src | |
parent | 917c2de203943328228bdf32ce714f47a6508192 (diff) |
macOS: Remove support for QSurfaceFormat::StereoBuffers
The NSOpenGLPFAStereo attribute was deprecated in macOS 10.12, without
any replacement, and adding the attribute to the pixel format results
in context creation failure, so we're assuming the feature is no longer
supported an disable it wholesale on macOS.
Change-Id: I27d9f300fdaff9abe90781e3160b97f8b66121ad
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoaglcontext.mm | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoaglcontext.mm b/src/plugins/platforms/cocoa/qcocoaglcontext.mm index 4d0fa2e28e..c23636a1a0 100644 --- a/src/plugins/platforms/cocoa/qcocoaglcontext.mm +++ b/src/plugins/platforms/cocoa/qcocoaglcontext.mm @@ -217,9 +217,6 @@ NSOpenGLPixelFormat *QCocoaGLContext::pixelFormatForSurfaceFormat(const QSurface << NSOpenGLPFASamples << NSOpenGLPixelFormatAttribute(format.samples()); } - if (format.stereo()) - attrs << NSOpenGLPFAStereo; - // Allow rendering on GPUs without a connected display attrs << NSOpenGLPFAAllowOfflineRenderers; @@ -277,6 +274,9 @@ void QCocoaGLContext::updateSurfaceFormat() // Debug contexts not supported on macOS m_format.setOption(QSurfaceFormat::DebugContext, false); + // Nor are stereo buffers (deprecated in macOS 10.12) + m_format.setOption(QSurfaceFormat::StereoBuffers, false); + // ------------------ Query the pixel format ------------------ NSOpenGLPixelFormat *pixelFormat = m_context.pixelFormat; @@ -306,8 +306,6 @@ void QCocoaGLContext::updateSurfaceFormat() else m_format.setSwapBehavior(QSurfaceFormat::SingleBuffer); - m_format.setOption(QSurfaceFormat::StereoBuffers, [pixelFormat qt_getAttribute:NSOpenGLPFAStereo]); - // ------------------- Query the context ------------------- m_format.setSwapInterval([m_context qt_getParameter:NSOpenGLCPSwapInterval]); |