Skip to content


Mac: allows apps to use OpenGL on a slower, integrated GPU.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
icculus committed Jan 5, 2016
1 parent 7678b1d commit 15bc7ae
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/video/cocoa/SDL_cocoaopengl.m
Expand Up @@ -173,6 +173,8 @@ - (void)setWindow:(SDL_Window *)newWindow
return NULL;

attr[i++] = NSOpenGLPFAAllowOfflineRenderers;

/* specify a profile if we're on Lion (10.7) or later. */
if (lion_or_later) {
NSOpenGLPixelFormatAttribute profile = NSOpenGLProfileVersionLegacy;
Expand Down

0 comments on commit 15bc7ae

Please sign in to comment.