Fixed Mac OS X build
authorSam Lantinga <slouken@libsdl.org>
Wed, 04 Jun 2014 16:35:07 -0700
changeset 8825 0cb64df3fa28
parent 8824 c2a79f186731
child 8826 acf0915f7fca
Fixed Mac OS X build
include/SDL_opengl.h
include/SDL_opengl_glext.h
--- a/include/SDL_opengl.h	Wed Jun 04 12:55:18 2014 -0700
+++ b/include/SDL_opengl.h	Wed Jun 04 16:35:07 2014 -0700
@@ -50,11 +50,7 @@
 #define __glext_h_              /* Don't let gl.h include glext.h */
 #endif
 #if defined(__MACOSX__)
-#include <stddef.h>             /* Needed for ptrdiff_t */
-/* Hack to prevent duplicate definition of GLsizeiptrARB and GLintptrARB in <OpenGL/gltypes.h> */
-#define GL_ARB_vertex_buffer_object 1
 #include <OpenGL/gl.h>          /* Header File For The OpenGL Library */
-#undef GL_ARB_vertex_buffer_object
 #define __X_GL_H
 #else
 #include <GL/gl.h>              /* Header File For The OpenGL Library */
--- a/include/SDL_opengl_glext.h	Wed Jun 04 12:55:18 2014 -0700
+++ b/include/SDL_opengl_glext.h	Wed Jun 04 16:35:07 2014 -0700
@@ -4135,8 +4135,13 @@
 
 #ifndef GL_ARB_vertex_buffer_object
 #define GL_ARB_vertex_buffer_object 1
+#ifdef __MACOSX__ /* The OS X headers haven't caught up with Khronos yet */
+typedef long GLsizeiptrARB;
+typedef long GLintptrARB;
+#else
 typedef ptrdiff_t GLsizeiptrARB;
 typedef ptrdiff_t GLintptrARB;
+#endif
 #define GL_BUFFER_SIZE_ARB                0x8764
 #define GL_BUFFER_USAGE_ARB               0x8765
 #define GL_ARRAY_BUFFER_ARB               0x8892