support automatic GPU switching on Mac
authorMike Erwin <significant.bit@gmail.com>
Thu, 4 Aug 2016 07:08:13 +0000 (03:08 -0400)
committerMike Erwin <significant.bit@gmail.com>
Thu, 4 Aug 2016 07:08:13 +0000 (03:08 -0400)
First attempt. On my laptop (Intel + nVidia) Blender still switches to
nVidia at launch time.

intern/ghost/intern/GHOST_ContextCGL.mm
release/darwin/blender.app/Contents/Info.plist

index 7642bad..6a39d76 100644 (file)
@@ -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);
index 0649a20..51d2146 100644 (file)
@@ -47,5 +47,7 @@
        <string>NSApplication</string>
        <key>NSHighResolutionCapable</key>
        <true/>
+       <key>NSSupportsAutomaticGraphicsSwitching</key>
+       <true/>
 </dict>
 </plist>