summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/plugins/platforms/cocoa/qcocoaglcontext.mm6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoaglcontext.mm b/src/plugins/platforms/cocoa/qcocoaglcontext.mm
index 7452d53579..900f0608c8 100644
--- a/src/plugins/platforms/cocoa/qcocoaglcontext.mm
+++ b/src/plugins/platforms/cocoa/qcocoaglcontext.mm
@@ -223,6 +223,12 @@ NSOpenGLPixelFormat *QCocoaGLContext::pixelFormatForSurfaceFormat(const QSurface
attrs << NSOpenGLPFAAllowOfflineRenderers;
}
+ if (qGuiApp->testAttribute(Qt::AA_UseSoftwareOpenGL)) {
+ // kCGLRendererGenericFloatID is the modern software renderer on macOS,
+ // as opposed to kCGLRendererGenericID, which is deprecated.
+ attrs << NSOpenGLPFARendererID << kCGLRendererGenericFloatID;
+ }
+
// FIXME: Pull this information out of the NSView
QByteArray useLayer = qgetenv("QT_MAC_WANTS_LAYER");
if (!useLayer.isEmpty() && useLayer.toInt() > 0) {