diff options
author | Sven Gothel <[email protected]> | 2015-02-26 02:58:56 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2015-02-26 02:58:56 +0100 |
commit | 6b05c6919f3df20ce0b55d5ac7dda7b14068568e (patch) | |
tree | 245cd1438996d40e55858cafca6d21ddca0a5a23 /make/stub_includes/khr/KHR/khrplatform.h | |
parent | 37ec129f36097f41ed0d45cbccd7a93e493e2bb9 (diff) |
Bug 1135 - Support EGL 1.5 , ES 3.1 and GL 4.5 - Part 1: Update header to latest version
- khr/KHR/khrplatform.h: 2013-09-30 vanilla
- opengl/GLES3/khrplatform.h *removed* -> khr/KHR/khrplatform.h
- egl/EGL/egl.h: 2015-01-02 vanilla
- egl/EGL/eglext.h: 2015-01-02 vanilla
- egl/EGL/eglplatform.h: 2013-10-09 vanilla
- opengl/GLES2/gl2.h: 2015-01-22 vanilla
- opengl/GLES2/gl2ext.h 2015-01-26 vanilla
- opengl/GLES2/gl2platform.h 2013-10-02 vanilla
- opengl/GLES3/gl3.h *removed* -> opengl/GLES3/gl31.h
- opengl/GLES3/gl31.h 2015-01-22 vanilla
- opengl/GLES3/gl3platform.h 2013-10-02 vanilla
- opengl/GL/glcorearb.h 2015-02-02 vanilla
- opengl/GL/glext.h 2015-02-02 vanilla
- opengl/GL/glxext.h 2014-09-18 vanilla
- opengl/GL/wglext.h 2014-08-11 vanilla
Diffstat (limited to 'make/stub_includes/khr/KHR/khrplatform.h')
-rw-r--r-- | make/stub_includes/khr/KHR/khrplatform.h | 103 |
1 files changed, 93 insertions, 10 deletions
diff --git a/make/stub_includes/khr/KHR/khrplatform.h b/make/stub_includes/khr/KHR/khrplatform.h index 1f10e5c0a..c9e6f17d3 100644 --- a/make/stub_includes/khr/KHR/khrplatform.h +++ b/make/stub_includes/khr/KHR/khrplatform.h @@ -26,7 +26,7 @@ /* Khronos platform-specific types and definitions. * - * $Revision: 9356 $ on $Date: 2009-10-21 02:52:25 -0700 (Wed, 21 Oct 2009) $ + * $Revision: 23298 $ on $Date: 2013-09-30 17:07:13 -0700 (Mon, 30 Sep 2013) $ * * Adopters may modify this file to suit their platform. Adopters are * encouraged to submit platform specific modifications to the Khronos @@ -132,14 +132,13 @@ /*------------------------------------------------------------------------- * basic type definitions *-----------------------------------------------------------------------*/ +#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__GNUC__) || defined(__SCO__) || defined(__USLC__) + /* - * Using <gluegen_stddef.h> - * Using <gluegen_stdint.h> + * Using <stdint.h> */ -#include <gluegen_stddef.h> -#define HAS_STDDEF 1 -#include <gluegen_stdint.h> +#include <stdint.h> typedef int32_t khronos_int32_t; typedef uint32_t khronos_uint32_t; typedef int64_t khronos_int64_t; @@ -147,14 +146,98 @@ typedef uint64_t khronos_uint64_t; #define KHRONOS_SUPPORT_INT64 1 #define KHRONOS_SUPPORT_FLOAT 1 +#elif defined(__VMS ) || defined(__sgi) + +/* + * Using <inttypes.h> + */ +#include <inttypes.h> +typedef int32_t khronos_int32_t; +typedef uint32_t khronos_uint32_t; +typedef int64_t khronos_int64_t; +typedef uint64_t khronos_uint64_t; +#define KHRONOS_SUPPORT_INT64 1 +#define KHRONOS_SUPPORT_FLOAT 1 + +#elif defined(_WIN32) && !defined(__SCITECH_SNAP__) + +/* + * Win32 + */ +typedef __int32 khronos_int32_t; +typedef unsigned __int32 khronos_uint32_t; +typedef __int64 khronos_int64_t; +typedef unsigned __int64 khronos_uint64_t; +#define KHRONOS_SUPPORT_INT64 1 +#define KHRONOS_SUPPORT_FLOAT 1 + +#elif defined(__sun__) || defined(__digital__) + +/* + * Sun or Digital + */ +typedef int khronos_int32_t; +typedef unsigned int khronos_uint32_t; +#if defined(__arch64__) || defined(_LP64) +typedef long int khronos_int64_t; +typedef unsigned long int khronos_uint64_t; +#else +typedef long long int khronos_int64_t; +typedef unsigned long long int khronos_uint64_t; +#endif /* __arch64__ */ +#define KHRONOS_SUPPORT_INT64 1 +#define KHRONOS_SUPPORT_FLOAT 1 + +#elif 0 + +/* + * Hypothetical platform with no float or int64 support + */ +typedef int khronos_int32_t; +typedef unsigned int khronos_uint32_t; +#define KHRONOS_SUPPORT_INT64 0 +#define KHRONOS_SUPPORT_FLOAT 0 + +#else + +/* + * Generic fallback + */ +#include <stdint.h> +typedef int32_t khronos_int32_t; +typedef uint32_t khronos_uint32_t; +typedef int64_t khronos_int64_t; +typedef uint64_t khronos_uint64_t; +#define KHRONOS_SUPPORT_INT64 1 +#define KHRONOS_SUPPORT_FLOAT 1 + +#endif + + +/* + * Types that are (so far) the same on all platforms + */ typedef signed char khronos_int8_t; typedef unsigned char khronos_uint8_t; typedef signed short int khronos_int16_t; typedef unsigned short int khronos_uint16_t; -typedef ptrdiff_t khronos_intptr_t; -typedef size_t khronos_uintptr_t; -typedef ptrdiff_t khronos_ssize_t; -typedef size_t khronos_usize_t; + +/* + * Types that differ between LLP64 and LP64 architectures - in LLP64, + * pointers are 64 bits, but 'long' is still 32 bits. Win64 appears + * to be the only LLP64 architecture in current use. + */ +#ifdef _WIN64 +typedef signed long long int khronos_intptr_t; +typedef unsigned long long int khronos_uintptr_t; +typedef signed long long int khronos_ssize_t; +typedef unsigned long long int khronos_usize_t; +#else +typedef signed long int khronos_intptr_t; +typedef unsigned long int khronos_uintptr_t; +typedef signed long int khronos_ssize_t; +typedef unsigned long int khronos_usize_t; +#endif #if KHRONOS_SUPPORT_FLOAT /* |