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>
This commit is contained in:
parent
917c2de203
commit
2664e84322
@ -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]);
|
||||
|
Loading…
Reference in New Issue
Block a user