src/video/quartz/SDL_QuartzGL.m
branchSDL-1.2
changeset 4204 976bc19f8f6b
parent 4188 9701c96e2cbb
child 4370 8d67936e32ec
     1.1 --- a/src/video/quartz/SDL_QuartzGL.m	Mon Sep 21 04:34:22 2009 +0000
     1.2 +++ b/src/video/quartz/SDL_QuartzGL.m	Mon Sep 21 06:08:23 2009 +0000
     1.3 @@ -41,13 +41,24 @@
     1.4  #define NSOpenGLPFASamples ((NSOpenGLPixelFormatAttribute) 56)
     1.5  #endif
     1.6  
     1.7 -
     1.8 +#ifdef __powerpc__   /* we lost this in 10.6, which has no PPC support. */
     1.9  @implementation NSOpenGLContext (CGLContextAccess)
    1.10  - (CGLContextObj) cglContext;
    1.11  {
    1.12      return _contextAuxiliary;
    1.13  }
    1.14  @end
    1.15 +CGLContextObj QZ_GetCGLContextObj(NSOpenGLContext *nsctx)
    1.16 +{
    1.17 +    return [nsctx cglContext];
    1.18 +}
    1.19 +#else
    1.20 +CGLContextObj QZ_GetCGLContextObj(NSOpenGLContext *nsctx)
    1.21 +{
    1.22 +    return (CGLContextObj) [nsctx CGLContextObj];
    1.23 +}
    1.24 +#endif
    1.25 +
    1.26  
    1.27  /* OpenGL helper functions (used internally) */
    1.28  
    1.29 @@ -165,7 +176,7 @@
    1.30  
    1.31      {
    1.32          long cache_max = 64;
    1.33 -        CGLContextObj ctx = [ gl_context cglContext ];
    1.34 +        CGLContextObj ctx = QZ_GetCGLContextObj(gl_context);
    1.35          CGLSetParameter (ctx, GLI_SUBMIT_FUNC_CACHE_MAX, &cache_max);
    1.36          CGLSetParameter (ctx, GLI_ARRAY_FUNC_CACHE_MAX, &cache_max);
    1.37      }