aboutsummaryrefslogtreecommitdiffstats
path: root/make/config/jogl/glx-headers.cfg
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2015-03-09 08:57:24 +0100
committerSven Gothel <[email protected]>2015-03-09 08:57:24 +0100
commit99d37df6cf410117cb8d49774ef7550bcf847c7b (patch)
treee0a8b810dfee33f0ff570bc9e9e3e80115935c96 /make/config/jogl/glx-headers.cfg
parente3385993b4133f88fd1b8e335438f5f2cd305555 (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/config/jogl/glx-headers.cfg')
-rw-r--r--make/config/jogl/glx-headers.cfg29
1 files changed, 15 insertions, 14 deletions
diff --git a/make/config/jogl/glx-headers.cfg b/make/config/jogl/glx-headers.cfg
index b38881f74..d5d4f5f2d 100644
--- a/make/config/jogl/glx-headers.cfg
+++ b/make/config/jogl/glx-headers.cfg
@@ -1,40 +1,41 @@
CustomCCode #include <stdio.h> /* android */
-CustomCCode /** Define GL_GLEXT_PROTOTYPES so that the OpenGL extension prototypes are parsed. */
-CustomCCode #define GL_GLEXT_PROTOTYPES
+CustomCCode #include <GL/gl-platform.h>
CustomCCode #if defined(_WIN32)
-CustomCCode #define WIN32_LEAN_AND_MEAN
-CustomCCode #include <windows.h>
-CustomCCode #undef WIN32_LEAN_AND_MEAN
CustomCCode #include <stdlib.h>
CustomCCode #include <stddef.h>
CustomCCode #include <malloc.h>
-CustomCCode /* Define WGL_GLEXT_PROTOTYPES so that the OpenGL extension prototypes in
+CustomCCode /* Define WGL_WGLEXT_PROTOTYPES so that the OpenGL extension prototypes in
CustomCCode "wglext.h" are parsed. */
-CustomCCode #define WGL_GLEXT_PROTOTYPES
-CustomCCode /* Include the OpenGL headers */
-CustomCCode #include <GL/gl.h>
+CustomCCode #define WGL_WGLEXT_PROTOTYPES
+CustomCCode /* included implicit via windows header: #include <wingdi.h> */
+CustomCCode #include <gl-types.h>
CustomCCode #include <GL/wglext.h>
CustomCCode #elif defined(__APPLE__)
CustomCCode #include <inttypes.h>
CustomCCode #include <stdlib.h>
-CustomCCode #include <machine/types.h>
CustomCCode /* Provide Windows typedefs */
CustomCCode typedef void* LPVOID;
CustomCCode typedef unsigned int* PUINT;
CustomCCode /* Include the OpenGL headers */
CustomCCode #include <GL/gl.h>
+CustomCCode #include <GL/glext.h>
+CustomCCode #include <GL/glext-supplement.h>
+CustomCCode #include <machine/types.h>
+CustomCCode /* Provide Windows typedefs */
+CustomCCode typedef void* LPVOID;
+CustomCCode typedef unsigned int* PUINT;
CustomCCode #elif defined(__unix__)
CustomCCode #include <inttypes.h>
CustomCCode #include <stdlib.h>
CustomCCode #include <X11/Xlib.h>
-CustomCCode /* Provide Windows typedefs */
-CustomCCode typedef void* LPVOID;
-CustomCCode typedef unsigned int* PUINT;
CustomCCode /* Define GLX_GLXEXT_PROTOTYPES so that the OpenGL extension prototypes in
CustomCCode "glxext.h" are parsed. */
CustomCCode #define GLX_GLXEXT_PROTOTYPES
-CustomCCode #include <GL/gl.h>
+CustomCCode #include <gl-types.h>
CustomCCode #include <GL/glx.h>
CustomCCode #include <GL/glxext.h>
+CustomCCode /* Provide Windows typedefs */
+CustomCCode typedef void* LPVOID;
+CustomCCode typedef unsigned int* PUINT;
CustomCCode #endif