From 0674a3678d747335ad36f0f57e3bdc9c168f0dcf Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Fri, 6 Mar 2015 09:42:13 +0100 Subject: Bug 1135 - Fix other GL header and windows-system header - GL/gl.h: remove added gl-types.h include, which causes 'redefined' warnings or errors. - GLES/glext.h: Use vanilla 'typedef void* GLeglImageOES' - opengl/gl-types.h: Complete all GL types - Fix windows.h and all its related header --- make/stub_includes/opengl/GL/gl-platform.h | 1 + make/stub_includes/opengl/GL/gl.h | 1 - make/stub_includes/opengl/GL/glcorearbext.h | 10 +++++- make/stub_includes/opengl/GLES/glext.h | 3 +- make/stub_includes/opengl/gl-types.h | 54 ++++++++++++++++++++++++++--- 5 files changed, 60 insertions(+), 9 deletions(-) (limited to 'make/stub_includes/opengl') diff --git a/make/stub_includes/opengl/GL/gl-platform.h b/make/stub_includes/opengl/GL/gl-platform.h index d07fd92ce..d55410b0a 100644 --- a/make/stub_includes/opengl/GL/gl-platform.h +++ b/make/stub_includes/opengl/GL/gl-platform.h @@ -49,6 +49,7 @@ #if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) #define WIN32_LEAN_AND_MEAN 1 #include +#undef WIN32_LEAN_AND_MEAN #endif /** diff --git a/make/stub_includes/opengl/GL/gl.h b/make/stub_includes/opengl/GL/gl.h index f6cfc7920..56812a531 100644 --- a/make/stub_includes/opengl/GL/gl.h +++ b/make/stub_includes/opengl/GL/gl.h @@ -35,7 +35,6 @@ /* Function declaration macros - to move into gl-platform.h */ #include "gl-platform.h" -#include "gl-types.h" #ifdef __cplusplus extern "C" { diff --git a/make/stub_includes/opengl/GL/glcorearbext.h b/make/stub_includes/opengl/GL/glcorearbext.h index 8fab1ddee..31df636ad 100644 --- a/make/stub_includes/opengl/GL/glcorearbext.h +++ b/make/stub_includes/opengl/GL/glcorearbext.h @@ -1,6 +1,10 @@ #ifndef __glcorearbext_h_ #define __glcorearbext_h_ 1 +#ifdef __cplusplus +extern "C" { +#endif + /* ** Copyright (c) 2010 JogAmp Developer Team ** @@ -26,7 +30,7 @@ /** * This header files contains additional extensions not covered by the - * 'official' khronos glcorearbext.h + * 'official' khronos glcorearb.h */ /* @@ -347,5 +351,9 @@ GLAPI void APIENTRY glStencilOpValueAMD (GLenum face, GLuint value); /* No need for explicit function pointer: we force generation of ProcAddress .. */ #endif +#ifdef __cplusplus +} +#endif + #endif /* __glcorearbext_h_ */ diff --git a/make/stub_includes/opengl/GLES/glext.h b/make/stub_includes/opengl/GLES/glext.h index 7a0a718ca..4f4f071f1 100644 --- a/make/stub_includes/opengl/GLES/glext.h +++ b/make/stub_includes/opengl/GLES/glext.h @@ -65,8 +65,7 @@ extern "C" { /* GL_OES_EGL_image */ #ifndef GL_OES_EGL_image -// typedef void* GLeglImageOES; -typedef struct __GLeglImageOES *GLeglImageOES; +typedef void* GLeglImageOES; #endif /* GL_OES_EGL_image_external */ diff --git a/make/stub_includes/opengl/gl-types.h b/make/stub_includes/opengl/gl-types.h index e7e869708..3a22cb839 100644 --- a/make/stub_includes/opengl/gl-types.h +++ b/make/stub_includes/opengl/gl-types.h @@ -1,15 +1,59 @@ #ifndef __gl_types_h_ #define __gl_types_h_ -#include +#ifdef __cplusplus +extern "C" { +#endif -#define GLEXT_64_TYPES_DEFINED 1 +#include +typedef khronos_int8_t GLbyte; +typedef khronos_float_t GLclampf; +typedef khronos_int32_t GLfixed; +typedef khronos_int32_t GLclampx; +typedef short GLshort; +typedef unsigned short GLushort; +typedef void GLvoid; +typedef struct __GLsync *GLsync; +typedef khronos_int64_t GLint64; typedef khronos_int64_t GLint64EXT; +typedef khronos_uint64_t GLuint64; typedef khronos_uint64_t GLuint64EXT; +typedef unsigned int GLenum; +typedef unsigned int GLuint; +typedef char GLchar; +typedef khronos_float_t GLfloat; +typedef khronos_ssize_t GLsizeiptr; +typedef khronos_intptr_t GLintptr; +typedef unsigned int GLbitfield; +typedef int GLint; +typedef unsigned char GLboolean; +typedef int GLsizei; +typedef khronos_uint8_t GLubyte; +typedef double GLdouble; /* double precision float */ +typedef double GLclampd; /* double precision float in [0,1] */ -typedef khronos_int64_t GLint64; -typedef khronos_uint64_t GLuint64; -typedef struct __GLsync *GLsync; +typedef char GLcharARB; +typedef GLsizeiptr GLsizeiptrARB; +typedef GLintptr GLintptrARB; +#ifdef __APPLE__ + typedef void *GLhandleARB; +#else + typedef unsigned int GLhandleARB; +#endif + +typedef void* GLeglImageOES; + +struct _cl_context; +struct _cl_event; + +typedef unsigned short GLhalfNV; +typedef GLintptr GLvdpauSurfaceNV; + +#define GLEXT_64_TYPES_DEFINED 1 + +#ifdef __cplusplus +} +#endif #endif /* __gl_types_h_ */ -- cgit v1.2.3