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/gl-platform.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/gl-platform.h')
-rw-r--r-- | make/stub_includes/opengl/GL/gl-platform.h | 54 |
1 files changed, 21 insertions, 33 deletions
diff --git a/make/stub_includes/opengl/GL/gl-platform.h b/make/stub_includes/opengl/GL/gl-platform.h index d55410b0a..f3680f28c 100644 --- a/make/stub_includes/opengl/GL/gl-platform.h +++ b/make/stub_includes/opengl/GL/gl-platform.h @@ -13,6 +13,20 @@ #define __WIN32__ #endif +/* + * WINDOWS: Include windows.h here to define APIENTRY. + * It is also useful when applications include this file by + * including only glut.h, since glut.h depends on windows.h. + * Applications needing to include windows.h with parms other + * than "WIN32_LEAN_AND_MEAN" may include windows.h before + * glut.h or gl.h. + */ +#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) +#define WIN32_LEAN_AND_MEAN 1 +#include <windows.h> +#undef WIN32_LEAN_AND_MEAN +#endif + #if !defined(OPENSTEP) && (defined(__WIN32__) && !defined(__CYGWIN__)) # if defined(_MSC_VER) && defined(BUILD_GL32) /* tag specify we're building mesa as a DLL */ # define GLAPI __declspec(dllexport) @@ -31,32 +45,19 @@ # endif # ifndef APIENTRY # define APIENTRY -# endif /* APIENTRY */ +# endif #endif /* WIN32 / CYGWIN bracket */ -#if (defined(__BEOS__) && defined(__POWERPC__)) || defined(__QUICKDRAW__) -# define PRAGMA_EXPORT_SUPPORTED 1 +#ifndef GLAPI +#define GLAPI extern #endif - -/* - * WINDOWS: Include windows.h here to define APIENTRY. - * It is also useful when applications include this file by - * including only glut.h, since glut.h depends on windows.h. - * Applications needing to include windows.h with parms other - * than "WIN32_LEAN_AND_MEAN" may include windows.h before - * glut.h or gl.h. - */ -#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) -#define WIN32_LEAN_AND_MEAN 1 -#include <windows.h> -#undef WIN32_LEAN_AND_MEAN +#ifndef APIENTRYP +#define APIENTRYP APIENTRY * #endif -/** -#if defined(_WIN32) && !defined(_WINGDI_) && !defined(_GNU_H_WINDOWS32_DEFINES) && !defined(OPENSTEP) && !defined(__CYGWIN__) -#include <gl/mesa_wgl.h> +#if (defined(__BEOS__) && defined(__POWERPC__)) || defined(__QUICKDRAW__) +# define PRAGMA_EXPORT_SUPPORTED 1 #endif -*/ #if defined(macintosh) && PRAGMA_IMPORT_SUPPORTED #pragma import on @@ -70,18 +71,5 @@ #pragma export on #endif -/** - * The defaults for all .. - */ -#ifndef APIENTRY -#define APIENTRY -#endif -#ifndef APIENTRYP -#define APIENTRYP APIENTRY * -#endif -#ifndef GLAPI -#define GLAPI extern -#endif - #endif /* __gl_platform_h_ */ |