Skip to content

Commit 15bc7ae

Browse files
committed
Mac: allows apps to use OpenGL on a slower, integrated GPU.
This is often useful for SDL apps that aren't meant to be games: the integrated GPU starts up faster, uses less power, and is often more than fast enough. Note that even with this change, the app will still default to the more powerful, discrete GPU if one is available; an app that prefers the integrated GPU will still need the NSSupportsAutomaticGraphicsSwitching key properly set in its Info.plist and Mac OS X 10.7 or later. https://developer.apple.com/library/mac/qa/qa1734/_index.html
1 parent 7678b1d commit 15bc7ae

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/video/cocoa/SDL_cocoaopengl.m

+2
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,8 @@ - (void)setWindow:(SDL_Window *)newWindow
173173
return NULL;
174174
}
175175

176+
attr[i++] = NSOpenGLPFAAllowOfflineRenderers;
177+
176178
/* specify a profile if we're on Lion (10.7) or later. */
177179
if (lion_or_later) {
178180
NSOpenGLPixelFormatAttribute profile = NSOpenGLProfileVersionLegacy;

0 commit comments

Comments
 (0)