comparison 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
comparison
equal deleted inserted replaced
3569:7f743e9b0b5b 3570:7812d3e9564e
26 /* NSOpenGL implementation of SDL OpenGL support */ 26 /* NSOpenGL implementation of SDL OpenGL support */
27 27
28 #if SDL_VIDEO_OPENGL_CGL 28 #if SDL_VIDEO_OPENGL_CGL
29 #include <OpenGL/CGLTypes.h> 29 #include <OpenGL/CGLTypes.h>
30 #include <OpenGL/OpenGL.h> 30 #include <OpenGL/OpenGL.h>
31 #include <OpenGL/CGLRenderers.h>
31 32
32 #include "SDL_loadso.h" 33 #include "SDL_loadso.h"
33 #include "SDL_opengl.h" 34 #include "SDL_opengl.h"
34 35
35 36
130 attr[i++] = NSOpenGLPFASamples; 131 attr[i++] = NSOpenGLPFASamples;
131 attr[i++] = _this->gl_config.multisamplesamples; 132 attr[i++] = _this->gl_config.multisamplesamples;
132 attr[i++] = NSOpenGLPFANoRecovery; 133 attr[i++] = NSOpenGLPFANoRecovery;
133 } 134 }
134 135
135 if (_this->gl_config.accelerated > 0) { 136 if (_this->gl_config.accelerated) {
136 attr[i++] = NSOpenGLPFAAccelerated; 137 attr[i++] = NSOpenGLPFAAccelerated;
138 } else {
139 attr[i++] = NSOpenGLPFARendererID;
140 attr[i++] = kCGLRendererGenericFloatID;
137 } 141 }
138 142
139 attr[i++] = NSOpenGLPFAScreenMask; 143 attr[i++] = NSOpenGLPFAScreenMask;
140 attr[i++] = CGDisplayIDToOpenGLDisplayMask(displaydata->display); 144 attr[i++] = CGDisplayIDToOpenGLDisplayMask(displaydata->display);
141 attr[i] = 0; 145 attr[i] = 0;