summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2014-02-06 14:45:53 -0800
committerEric Anholt <eric@anholt.net>2014-02-06 14:50:22 -0800
commit67a1ad4f6c99b508209973cf3d5382491577a0ff (patch)
treecdd7bf8035e1c49f9963fe0cb08cf248896b9956
parent9998c39e8d4e5be0ff8b15f5ea1521c861b2c0e6 (diff)
Add limited support for the KHRONOS_* defines from khrplatform.h.
The only way these get used is when you choose to include epoxy/gl.h but EGL/egl.h. I'm not sure that's something I want to actually support, but piglit happened to do so, and this gets things working. There's not as much support here as in real khrplatform.h, but then there's no EGL for windows. And seriously, compilers support 64-bit and float types, why would you even build this complexity?
-rw-r--r--include/epoxy/gl.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/epoxy/gl.h b/include/epoxy/gl.h
index d389076..76634e3 100644
--- a/include/epoxy/gl.h
+++ b/include/epoxy/gl.h
@@ -43,12 +43,19 @@ extern "C" {
#define __glext_h_
#endif
+#define KHRONOS_SUPPORT_INT64 1
+#define KHRONOS_SUPPORT_FLOAT 1
+#define KHRONOS_APIATTRIBUTES
+
#ifndef _WIN32
/* APIENTRY and GLAPIENTRY are not used on Linux or Mac. */
#define APIENTRY
#define GLAPIENTRY
#define EPOXYAPIENTRY
#define GLAPI
+#define KHRONOS_APIENTRY
+#define KHRONOS_APICALL
+
#else
#ifndef APIENTRY
#define APIENTRY __stdcall
@@ -65,6 +72,10 @@ extern "C" {
#ifndef GLAPI
#define GLAPI extern
#endif
+
+#define KHRONOS_APIENTRY __stdcall
+#define KHRONOS_APICALL __declspec(dllimport) __stdcall
+
#endif /* _WIN32 */
#ifndef APIENTRYP