diff options
author | Sven Gothel <[email protected]> | 2015-03-09 08:57:24 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2015-03-09 08:57:24 +0100 |
commit | 99d37df6cf410117cb8d49774ef7550bcf847c7b (patch) | |
tree | e0a8b810dfee33f0ff570bc9e9e3e80115935c96 /make/stub_includes/opengl/GL/glx.h | |
parent | e3385993b4133f88fd1b8e335438f5f2cd305555 (diff) |
Bug 1135 - (Re-)Include GL header for in generated native code, allowing 'ProcAddrTypedef' validation
Include GL header for in generated native code,
since we need the public 'ProcAddrTypedef' to be validated
against the GlueGen generated variant by the c-compiler.
The 'ProcAddrTypedef' validation semantic has been
introduced in GlueGen w/ commit 10060b091b76bee35246c5165d49ab546ebc4e37.
Originally the GL header were always included,
however, JOGL commit 0d59bd4c655ef9a27f127000848aae7f07f240ae
removed the inclusion to simplify handling GL extension collisions
mitigated via gl*-supplement.h. The latter produces 'redefine'
errors via c-compiler.
The 'redefine' issue above is resolved
by conditional code (#ifdef __GLUEGEN__ ..)
in glext-supplement.h.
Diffstat (limited to 'make/stub_includes/opengl/GL/glx.h')
-rw-r--r-- | make/stub_includes/opengl/GL/glx.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/make/stub_includes/opengl/GL/glx.h b/make/stub_includes/opengl/GL/glx.h index a74cd23e8..dc4b85dac 100644 --- a/make/stub_includes/opengl/GL/glx.h +++ b/make/stub_includes/opengl/GL/glx.h @@ -44,8 +44,10 @@ #pragma message enable nosimpint #endif #endif -#include <GL/gl.h> +// Due to 'glext-supplement.h', we prefer to include it manually afterwards. +// This gives us the same behavior as the vanilla GLES, GLES2, GLES3 and glcorearb header. +// #include <GL/gl.h> #if defined(USE_MGL_NAMESPACE) #include <GL/glx_mangle.h> @@ -176,7 +178,7 @@ typedef void ( *__GLXextFuncPtr)(void); #define GLX_SAMPLE_BUFFERS 100000 #define GLX_SAMPLES 100001 typedef __GLXextFuncPtr ( *PFNGLXGETPROCADDRESSPROC) (const GLubyte *procName); -#ifdef GL_GLEXT_PROTOTYPES +#ifdef GLX_GLXEXT_PROTOTYPES __GLXextFuncPtr glXGetProcAddress (const GLubyte *procName); #endif #endif /* GLX_VERSION_1_4 */ @@ -184,13 +186,14 @@ __GLXextFuncPtr glXGetProcAddress (const GLubyte *procName); #ifndef GLX_ARB_get_proc_address #define GLX_ARB_get_proc_address 1 typedef __GLXextFuncPtr ( *PFNGLXGETPROCADDRESSARBPROC) (const GLubyte *procName); -#ifdef GL_GLEXT_PROTOTYPES +#ifdef GLX_GLXEXT_PROTOTYPES __GLXextFuncPtr glXGetProcAddressARB (const GLubyte *procName); #endif #endif /* GLX_ARB_get_proc_address */ - -#include <GL/glxext.h> +// Due to 'glext-supplement.h', we prefer to include it manually afterwards. +// This gives us the same behavior as the vanilla GLES, GLES2, GLES3 and glcorearb header. +// #include <GL/glxext.h> #ifdef __cplusplus } |