Skip to content

Commit

Permalink
Add limited support for the KHRONOS_* defines from khrplatform.h.
Browse files Browse the repository at this point in the history
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?
  • Loading branch information
anholt committed Feb 6, 2014
1 parent 9998c39 commit 67a1ad4
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions include/epoxy/gl.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 67a1ad4

Please sign in to comment.