summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--FL/gl.h6
-rw-r--r--src/gl_draw.cxx10
2 files changed, 6 insertions, 10 deletions
diff --git a/FL/gl.h b/FL/gl.h
index b59ddc173..bb0881df1 100644
--- a/FL/gl.h
+++ b/FL/gl.h
@@ -56,12 +56,6 @@
# ifdef __APPLE__
# include <OpenGL/gl.h>
-# ifdef FL_LIBRARY
-# include <FL/x.H>
-# if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_4
-# include <OpenGL/glext.h>
-# endif
-# endif // FL_LIBRARY
# else
# include <GL/gl.h>
# endif // __APPLE__
diff --git a/src/gl_draw.cxx b/src/gl_draw.cxx
index a3a08e54b..6f88d0637 100644
--- a/src/gl_draw.cxx
+++ b/src/gl_draw.cxx
@@ -36,6 +36,12 @@
#include "Xutf8.h"
#endif
+#if defined(__APPLE__) && MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_4
+# include <OpenGL/glext.h>
+# define kCGBitmapByteOrder32Host 0
+# define GL_TEXTURE_RECTANGLE_ARB GL_TEXTURE_RECTANGLE_EXT
+#endif // __APPLE__
+
/** Returns the current font's height */
int gl_height() {return fl_height();}
/** Returns the current font's descent */
@@ -329,10 +335,6 @@ void gl_draw_image(const uchar* b, int x, int y, int w, int h, int d, int ld) {
but not text font, and only ASCII characters can be drawn.
*/
-#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_4
-#define kCGBitmapByteOrder32Host 0
-#define GL_TEXTURE_RECTANGLE_ARB GL_TEXTURE_RECTANGLE_EXT
-#endif
static int gl_scale = 1; // set to 2 for high resolution Fl_Gl_Window
static int has_texture_rectangle = 0; // true means GL_EXT_texture_rectangle is available