comparison src/video/cocoa/SDL_cocoaopengl.m @ 4925:514f811a4887

Removed support for 10.3.9 Fixed building on Mac OS X 10.5
author Sam Lantinga <slouken@libsdl.org>
date Wed, 01 Dec 2010 12:23:16 -0800
parents 3d91e31fcf71
children 58265e606e4e
comparison
equal deleted inserted replaced
4924:455c0dad84df 4925:514f811a4887
33 #include "SDL_loadso.h" 33 #include "SDL_loadso.h"
34 #include "SDL_opengl.h" 34 #include "SDL_opengl.h"
35 35
36 36
37 #define DEFAULT_OPENGL "/System/Library/Frameworks/OpenGL.framework/Libraries/libGL.dylib" 37 #define DEFAULT_OPENGL "/System/Library/Frameworks/OpenGL.framework/Libraries/libGL.dylib"
38
39 /* This is implemented in Mac OS X 10.3 and above */
40 #if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_3
41 @implementation NSOpenGLContext(CGLContextAccess)
42 - (CGLContextObj)CGLContextObj;
43 {
44 return _contextAuxiliary;
45 }
46 @end
47 #endif /* < 10.3 */
48 38
49 int 39 int
50 Cocoa_GL_LoadLibrary(_THIS, const char *path) 40 Cocoa_GL_LoadLibrary(_THIS, const char *path)
51 { 41 {
52 /* Load the OpenGL library */ 42 /* Load the OpenGL library */
178 #ifndef GLI_SUBMIT_FUNC_CACHE_MAX 168 #ifndef GLI_SUBMIT_FUNC_CACHE_MAX
179 #define GLI_SUBMIT_FUNC_CACHE_MAX 280 169 #define GLI_SUBMIT_FUNC_CACHE_MAX 280
180 #endif 170 #endif
181 171
182 { 172 {
183 long cache_max = 64; 173 GLint cache_max = 64;
184 CGLContextObj ctx = [context CGLContextObj]; 174 CGLContextObj ctx = [context CGLContextObj];
185 CGLSetParameter (ctx, GLI_SUBMIT_FUNC_CACHE_MAX, &cache_max); 175 CGLSetParameter (ctx, GLI_SUBMIT_FUNC_CACHE_MAX, &cache_max);
186 CGLSetParameter (ctx, GLI_ARRAY_FUNC_CACHE_MAX, &cache_max); 176 CGLSetParameter (ctx, GLI_ARRAY_FUNC_CACHE_MAX, &cache_max);
187 } 177 }
188 178