changeset 857:ce05e92d909b

Attempt to get FSAA compiling on all versions of MacOS X.
author Ryan C. Gordon <icculus@icculus.org>
date Thu, 26 Feb 2004 08:57:32 +0000
parents d3165b90ee42
children 5db50aa5bf08
files src/video/quartz/SDL_QuartzGL.m
diffstat 1 files changed, 18 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/video/quartz/SDL_QuartzGL.m	Tue Feb 24 19:22:22 2004 +0000
+++ b/src/video/quartz/SDL_QuartzGL.m	Thu Feb 26 08:57:32 2004 +0000
@@ -22,6 +22,24 @@
 
 #include "SDL_QuartzVideo.h"
 
+/*
+ * GL_ARB_Multisample is supposed to be available in 10.1, according to Apple:
+ *
+ *   http://developer.apple.com/opengl/extensions.html#GL_ARB_multisample
+ *
+ *  ...but it isn't in the system headers, according to Sam:
+ *
+ *   http://www.libsdl.org/pipermail/sdl/2003-December/058335.html
+ *
+ * These are normally enums and not #defines in the system headers.
+ *
+ *   --ryan.
+ */
+#if (MAC_OS_X_VERSION_MAX_ALLOWED < 1020)
+#define NSOpenGLPFASampleBuffers ((NSOpenGLPixelFormatAttribute) 55)
+#define NSOpenGLPFASamples ((NSOpenGLPixelFormatAttribute) 56)
+#endif
+
 
 @implementation NSOpenGLContext (CGLContextAccess)
 - (CGLContextObj) cglContext;
@@ -68,7 +86,6 @@
         attr[i++] = this->gl_config.stencil_size;
     }
 
-#if NSOPENGL_CURRENT_VERSION > 1  /* What version should this be? */
     if ( this->gl_config.multisamplebuffers != 0 ) {
         attr[i++] = NSOpenGLPFASampleBuffers;
         attr[i++] = this->gl_config.multisamplebuffers;
@@ -78,7 +95,6 @@
         attr[i++] = NSOpenGLPFASamples;
         attr[i++] = this->gl_config.multisamplesamples;
     }
-#endif
 
     attr[i++] = NSOpenGLPFAScreenMask;
     attr[i++] = CGDisplayIDToOpenGLDisplayMask (display_id);