Attempt to get FSAA compiling on all versions of MacOS X.
authorRyan C. Gordon
Thu, 26 Feb 2004 08:57:32 +0000
changeset 857ce05e92d909b
parent 856 d3165b90ee42
child 858 5db50aa5bf08
Attempt to get FSAA compiling on all versions of MacOS X.
src/video/quartz/SDL_QuartzGL.m
     1.1 --- a/src/video/quartz/SDL_QuartzGL.m	Tue Feb 24 19:22:22 2004 +0000
     1.2 +++ b/src/video/quartz/SDL_QuartzGL.m	Thu Feb 26 08:57:32 2004 +0000
     1.3 @@ -22,6 +22,24 @@
     1.4  
     1.5  #include "SDL_QuartzVideo.h"
     1.6  
     1.7 +/*
     1.8 + * GL_ARB_Multisample is supposed to be available in 10.1, according to Apple:
     1.9 + *
    1.10 + *   http://developer.apple.com/opengl/extensions.html#GL_ARB_multisample
    1.11 + *
    1.12 + *  ...but it isn't in the system headers, according to Sam:
    1.13 + *
    1.14 + *   http://www.libsdl.org/pipermail/sdl/2003-December/058335.html
    1.15 + *
    1.16 + * These are normally enums and not #defines in the system headers.
    1.17 + *
    1.18 + *   --ryan.
    1.19 + */
    1.20 +#if (MAC_OS_X_VERSION_MAX_ALLOWED < 1020)
    1.21 +#define NSOpenGLPFASampleBuffers ((NSOpenGLPixelFormatAttribute) 55)
    1.22 +#define NSOpenGLPFASamples ((NSOpenGLPixelFormatAttribute) 56)
    1.23 +#endif
    1.24 +
    1.25  
    1.26  @implementation NSOpenGLContext (CGLContextAccess)
    1.27  - (CGLContextObj) cglContext;
    1.28 @@ -68,7 +86,6 @@
    1.29          attr[i++] = this->gl_config.stencil_size;
    1.30      }
    1.31  
    1.32 -#if NSOPENGL_CURRENT_VERSION > 1  /* What version should this be? */
    1.33      if ( this->gl_config.multisamplebuffers != 0 ) {
    1.34          attr[i++] = NSOpenGLPFASampleBuffers;
    1.35          attr[i++] = this->gl_config.multisamplebuffers;
    1.36 @@ -78,7 +95,6 @@
    1.37          attr[i++] = NSOpenGLPFASamples;
    1.38          attr[i++] = this->gl_config.multisamplesamples;
    1.39      }
    1.40 -#endif
    1.41  
    1.42      attr[i++] = NSOpenGLPFAScreenMask;
    1.43      attr[i++] = CGDisplayIDToOpenGLDisplayMask (display_id);