macOS: Respect Qt::AA_UseSoftwareOpenGL
Change-Id: Ia83e8e9e571e4f46d2a8d810c376015552755457 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
This commit is contained in:
parent
f39230fcac
commit
312793f28e
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user