diff options
| -rw-r--r-- | FL/gl.h | 3 | ||||
| -rw-r--r-- | src/Fl_Gl_Device_Plugin.cxx | 3 | ||||
| -rw-r--r-- | src/Fl_cocoa.mm | 2 |
3 files changed, 8 insertions, 0 deletions
@@ -56,6 +56,9 @@ # ifdef __APPLE__ # include <OpenGL/gl.h> +#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_4 +# include <OpenGL/glext.h> +#endif # else # include <GL/gl.h> # endif diff --git a/src/Fl_Gl_Device_Plugin.cxx b/src/Fl_Gl_Device_Plugin.cxx index e9b43d1cf..a63a4dd50 100644 --- a/src/Fl_Gl_Device_Plugin.cxx +++ b/src/Fl_Gl_Device_Plugin.cxx @@ -90,6 +90,9 @@ static Fl_RGB_Image* capture_gl_rectangle(Fl_Gl_Window *glw, int x, int y, int w } #ifdef __APPLE__ +#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_4 +typedef CGImageAlphaInfo CGBitmapInfo; +#endif static void imgProviderReleaseData (void *info, const void *data, size_t size) { delete (Fl_RGB_Image *)info; diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm index e5eb1c934..5c322cc92 100644 --- a/src/Fl_cocoa.mm +++ b/src/Fl_cocoa.mm @@ -2715,7 +2715,9 @@ NSOpenGLPixelFormat* Fl_X::mode_to_NSOpenGLPixelFormat(int m, const int *alistp) attribs[n++] = NSOpenGLPFAStereo; } if (m & FL_MULTISAMPLE) { +#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4 attribs[n++] = NSOpenGLPFAMultisample, +#endif attribs[n++] = NSOpenGLPFASampleBuffers; attribs[n++] = (NSOpenGLPixelFormatAttribute)1; attribs[n++] = NSOpenGLPFASamples; attribs[n++] = (NSOpenGLPixelFormatAttribute)4; } |
