diff src/video/cocoa/SDL_cocoaopengl.m @ 3570:7812d3e9564e

OpenGL hardware acceleration defaults on
author Sam Lantinga <slouken@libsdl.org>
date Tue, 15 Dec 2009 20:36:31 +0000
parents 089a77aebb7d
children 19691cebb866
line wrap: on
line diff
--- a/src/video/cocoa/SDL_cocoaopengl.m	Tue Dec 15 20:14:50 2009 +0000
+++ b/src/video/cocoa/SDL_cocoaopengl.m	Tue Dec 15 20:36:31 2009 +0000
@@ -28,6 +28,7 @@
 #if SDL_VIDEO_OPENGL_CGL
 #include <OpenGL/CGLTypes.h>
 #include <OpenGL/OpenGL.h>
+#include <OpenGL/CGLRenderers.h>
 
 #include "SDL_loadso.h"
 #include "SDL_opengl.h"
@@ -132,8 +133,11 @@
         attr[i++] = NSOpenGLPFANoRecovery;
     }
 
-    if (_this->gl_config.accelerated > 0) {
+    if (_this->gl_config.accelerated) {
         attr[i++] = NSOpenGLPFAAccelerated;
+    } else {
+        attr[i++] = NSOpenGLPFARendererID;
+        attr[i++] = kCGLRendererGenericFloatID;
     }
 
     attr[i++] = NSOpenGLPFAScreenMask;