support automatic GPU switching on Mac

First attempt. On my laptop (Intel + nVidia) Blender still switches to
nVidia at launch time.
This commit is contained in:
Mike Erwin 2016-08-04 03:08:13 -04:00
parent b3cb7e2652
commit 3d9cc4d3f1
2 changed files with 3 additions and 2 deletions

@ -209,8 +209,7 @@ static void makeAttribList(
attribs.push_back(NSOpenGLPFAAccelerated);
}
/* Removed to allow 10.4 builds, and 2 GPUs rendering is not used anyway */
//attribs.push_back(NSOpenGLPFAAllowOfflineRenderers);
attribs.push_back(NSOpenGLPFAAllowOfflineRenderers); // for automatic GPU switching
attribs.push_back(NSOpenGLPFADepthSize);
attribs.push_back((NSOpenGLPixelFormatAttribute) 32);

@ -47,5 +47,7 @@
<string>NSApplication</string>
<key>NSHighResolutionCapable</key>
<true/>
<key>NSSupportsAutomaticGraphicsSwitching</key>
<true/>
</dict>
</plist>