From 5a5a23a533df0ec5f47f94a7bda901e703b25040 Mon Sep 17 00:00:00 2001 From: Wade Walker Date: Sun, 5 Jul 2015 09:53:06 -0500 Subject: GLhandleARB set to void * on OS X, unsigned int everywhere else The OpenCL headers on OS X include gltypes.h, which defines GLhandleARB as void *, but the stub headers gl3.h and glext.h in JOCL were defining it as unsigned int. Put in a typedef to match how Khronos fixes the problem. See http://sourceforge.net/p/glew/bugs/206/, https://bitbucket.org/alfonse/glloadgen/issue/33/mac-compilation-error, https://www.opengl.org/registry/api/GL/glext.h, and https://www.khronos.org/bugzilla/show_bug.cgi?id=762 for more information. --- make/stub_includes/GL3/gl3.h | 4 ++++ make/stub_includes/GL3/glext.h | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/make/stub_includes/GL3/gl3.h b/make/stub_includes/GL3/gl3.h index 176ddb16..b30e6c43 100644 --- a/make/stub_includes/GL3/gl3.h +++ b/make/stub_includes/GL3/gl3.h @@ -1520,8 +1520,12 @@ typedef ptrdiff_t GLsizeiptrARB; #ifndef GL_ARB_shader_objects /* GL types for program/shader text and shader object handles */ typedef char GLcharARB; +#ifdef __APPLE__ +typedef void *GLhandleARB; +#else typedef unsigned int GLhandleARB; #endif +#endif /* GL type for "half" precision (s10e5) float data in host memory */ #ifndef GL_ARB_half_float_pixel diff --git a/make/stub_includes/GL3/glext.h b/make/stub_includes/GL3/glext.h index 8e40956e..5c32f0d4 100644 --- a/make/stub_includes/GL3/glext.h +++ b/make/stub_includes/GL3/glext.h @@ -4861,8 +4861,12 @@ typedef ptrdiff_t GLsizeiptrARB; #ifndef GL_ARB_shader_objects /* GL types for program/shader text and shader object handles */ typedef char GLcharARB; +#ifdef __APPLE__ +typedef void *GLhandleARB; +#else typedef unsigned int GLhandleARB; #endif +#endif /* GL type for "half" precision (s10e5) float data in host memory */ #ifndef GL_ARB_half_float_pixel @@ -5084,4 +5088,4 @@ typedef void (APIENTRYP PFNGLMULTITEXCOORD1IPROC) (GLenum target, GLint s); typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVPROC) (GLenum target, const GLint *v); typedef void (APIENTRYP PFNGLMULTITEXCOORD1SPROC) (GLenum target, GLshort s); typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVPROC) (GLenum target, const GLshort *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2DPROC) (GL \ No newline at end of file +typedef void (APIENTRYP PFNGLMULTITEXCOORD2DPROC) (GL -- cgit v1.2.3