Fixed Mac OS X build
authorSam Lantinga <slouken@libsdl.org>
Wed, 04 Jun 2014 16:35:07 -0700
changeset 88250cb64df3fa28
parent 8824 c2a79f186731
child 8826 acf0915f7fca
Fixed Mac OS X build
include/SDL_opengl.h
include/SDL_opengl_glext.h
     1.1 --- a/include/SDL_opengl.h	Wed Jun 04 12:55:18 2014 -0700
     1.2 +++ b/include/SDL_opengl.h	Wed Jun 04 16:35:07 2014 -0700
     1.3 @@ -50,11 +50,7 @@
     1.4  #define __glext_h_              /* Don't let gl.h include glext.h */
     1.5  #endif
     1.6  #if defined(__MACOSX__)
     1.7 -#include <stddef.h>             /* Needed for ptrdiff_t */
     1.8 -/* Hack to prevent duplicate definition of GLsizeiptrARB and GLintptrARB in <OpenGL/gltypes.h> */
     1.9 -#define GL_ARB_vertex_buffer_object 1
    1.10  #include <OpenGL/gl.h>          /* Header File For The OpenGL Library */
    1.11 -#undef GL_ARB_vertex_buffer_object
    1.12  #define __X_GL_H
    1.13  #else
    1.14  #include <GL/gl.h>              /* Header File For The OpenGL Library */
     2.1 --- a/include/SDL_opengl_glext.h	Wed Jun 04 12:55:18 2014 -0700
     2.2 +++ b/include/SDL_opengl_glext.h	Wed Jun 04 16:35:07 2014 -0700
     2.3 @@ -4135,8 +4135,13 @@
     2.4  
     2.5  #ifndef GL_ARB_vertex_buffer_object
     2.6  #define GL_ARB_vertex_buffer_object 1
     2.7 +#ifdef __MACOSX__ /* The OS X headers haven't caught up with Khronos yet */
     2.8 +typedef long GLsizeiptrARB;
     2.9 +typedef long GLintptrARB;
    2.10 +#else
    2.11  typedef ptrdiff_t GLsizeiptrARB;
    2.12  typedef ptrdiff_t GLintptrARB;
    2.13 +#endif
    2.14  #define GL_BUFFER_SIZE_ARB                0x8764
    2.15  #define GL_BUFFER_USAGE_ARB               0x8765
    2.16  #define GL_ARRAY_BUFFER_ARB               0x8892