[macos] allow using the integrated GPU on dual-GPU machines
This commit is contained in:
@@ -20,6 +20,8 @@ HeadlessDisplay::Impl::Impl() {
|
||||
CGLPixelFormatAttribute attributes[] = {
|
||||
kCGLPFAOpenGLProfile,
|
||||
static_cast<CGLPixelFormatAttribute>(kCGLOGLPVersion_Legacy),
|
||||
kCGLPFASupportsAutomaticGraphicsSwitching,
|
||||
kCGLPFAAllowOfflineRenderers, // Allows using the integrated GPU
|
||||
static_cast<CGLPixelFormatAttribute>(0)
|
||||
};
|
||||
|
||||
|
||||
@@ -52,5 +52,7 @@
|
||||
<string>MainMenu</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>NSApplication</string>
|
||||
<key>NSSupportsAutomaticGraphicsSwitching</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
NSOpenGLPFADepthSize, 16,
|
||||
NSOpenGLPFAStencilSize, 8,
|
||||
NSOpenGLPFAScreenMask, mask,
|
||||
NSOpenGLPFAAllowOfflineRenderers, // Allows using the integrated GPU
|
||||
0
|
||||
};
|
||||
return [[NSOpenGLPixelFormat alloc] initWithAttributes:pfas];
|
||||
|
||||
Reference in New Issue
Block a user