aboutsummaryrefslogtreecommitdiffstats
path: root/make/stub_includes
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2015-03-06 09:42:13 +0100
committerSven Gothel <[email protected]>2015-03-06 09:42:13 +0100
commit0674a3678d747335ad36f0f57e3bdc9c168f0dcf (patch)
treea6841c14fc41ca14586f684136fe792362094195 /make/stub_includes
parenta554616fae30facd7574679b5c8b244757b7ccd9 (diff)
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
Diffstat (limited to 'make/stub_includes')
-rw-r--r--make/stub_includes/opengl/GL/gl-platform.h1
-rw-r--r--make/stub_includes/opengl/GL/gl.h1
-rw-r--r--make/stub_includes/opengl/GL/glcorearbext.h10
-rw-r--r--make/stub_includes/opengl/GLES/glext.h3
-rw-r--r--make/stub_includes/opengl/gl-types.h54
-rw-r--r--make/stub_includes/win32/windows.h4
-rw-r--r--make/stub_includes/win32/wingdi.h4
-rw-r--r--make/stub_includes/win32/wingdi_types.h5
-rw-r--r--make/stub_includes/win32/winwgl.h4
-rw-r--r--make/stub_includes/x11/X11/X.h2
10 files changed, 71 insertions, 17 deletions
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 <windows.h>
+#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 <KHR/khrplatform.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
-#define GLEXT_64_TYPES_DEFINED 1
+#include <KHR/khrplatform.h>
+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_ */
diff --git a/make/stub_includes/win32/windows.h b/make/stub_includes/win32/windows.h
index f7b141e31..9958e6d3a 100644
--- a/make/stub_includes/win32/windows.h
+++ b/make/stub_includes/win32/windows.h
@@ -1,6 +1,9 @@
/* Windows #defines and typedefs required for processing of extracts
from WINGDI.H and jawt_md.h */
+#ifndef _WINDOWS_
+#define _WINDOWS_
+
#define FAR
#define WINBASEAPI
#define WINGDIAPI
@@ -50,3 +53,4 @@ typedef HANDLE HVIDEOOUTPUTDEVICENV;
typedef HANDLE HVIDEOINPUTDEVICENV;
typedef HANDLE HPVIDEODEV;
+#endif /* _WINDOWS_ */
diff --git a/make/stub_includes/win32/wingdi.h b/make/stub_includes/win32/wingdi.h
index e252b3b36..0fb042eb1 100644
--- a/make/stub_includes/win32/wingdi.h
+++ b/make/stub_includes/win32/wingdi.h
@@ -9,11 +9,11 @@
* Editions / Removals and a split (wingdi.h -> wingdi.h + wingdi_types.h + winwgl.h) were made by the JogAmp Community, 2010, 2012
*/
-#include "wingdi_types.h"
-
#ifndef GDI_VERSION_1_X
#define GDI_VERSION_1_X
+#include "wingdi_types.h"
+
// Windows routines
WINBASEAPI DWORD WINAPI GetLastError(VOID);
diff --git a/make/stub_includes/win32/wingdi_types.h b/make/stub_includes/win32/wingdi_types.h
index d23502cad..14210bf2f 100644
--- a/make/stub_includes/win32/wingdi_types.h
+++ b/make/stub_includes/win32/wingdi_types.h
@@ -9,7 +9,8 @@
* Editions / Removals and a split (wingdi.h -> wingdi.h + wingdi_types.h + winwgl.h) were made by the JogAmp Community, 2010, 2012
*/
-#ifndef GDI_VERSION_1_X
+#ifndef GDI_TYPES_1_X
+#define GDI_TYPES_1_X
typedef struct tagRECT {
LONG left;
@@ -161,6 +162,6 @@ typedef struct tagPIXELFORMATDESCRIPTOR {
#define OBJ_ENHMETAFILE 13
#define OBJ_COLORSPACE 14
-#endif /* GDI_VERSION_1_X */
+#endif /* GDI_TYPES_1_X */
diff --git a/make/stub_includes/win32/winwgl.h b/make/stub_includes/win32/winwgl.h
index c0dfb9bdb..cc0589574 100644
--- a/make/stub_includes/win32/winwgl.h
+++ b/make/stub_includes/win32/winwgl.h
@@ -9,10 +9,10 @@
* Editions / Removals and a split (wingdi.h -> wingdi.h + wingdi_types.h + winwgl.h) were made by the JogAmp Community, 2010, 2012
*/
-#include "wingdi_types.h"
-
#ifndef WGL_GDI_VERSION_1_X
+#include "wingdi_types.h"
+
/* layer types */
#define WGL_SWAP_MAIN_PLANE 1
#define WGL_SWAP_OVERLAY1 2
diff --git a/make/stub_includes/x11/X11/X.h b/make/stub_includes/x11/X11/X.h
index 239836ee4..2deb46597 100644
--- a/make/stub_includes/x11/X11/X.h
+++ b/make/stub_includes/x11/X11/X.h
@@ -17,12 +17,10 @@ typedef XID Pixmap;
typedef XID Window;
typedef struct __GLXcontextRec *GLXContext;
-//typedef void *GLXContext;
typedef XID GLXPixmap;
typedef XID GLXDrawable;
/* GLX 1.3 and later */
typedef struct __GLXFBConfigRec *GLXFBConfig;
-//typedef void *GLXFBConfig;
typedef XID GLXFBConfigID;
typedef XID GLXContextID;
typedef XID GLXWindow;