From b4fc8faaabcface6421ffe4acc47cc5c99706cff Mon Sep 17 00:00:00 2001 From: Neil Roberts Date: Wed, 18 Nov 2009 19:09:10 +0000 Subject: [PATCH] cogl: Use APIENTRY for GL function pointer declarations This matters for platforms such as Windows that use a different calling covention from the default for GL functions. --- cogl/driver/gl/cogl-context-driver.h | 6 +++++- cogl/driver/gles/cogl-context-driver.h | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/cogl/driver/gl/cogl-context-driver.h b/cogl/driver/gl/cogl-context-driver.h index 0f8baa7e3..58f4fe91e 100644 --- a/cogl/driver/gl/cogl-context-driver.h +++ b/cogl/driver/gl/cogl-context-driver.h @@ -26,10 +26,14 @@ #include "cogl.h" +#ifndef APIENTRY +#define APIENTRY +#endif + #define COGL_FEATURE_BEGIN(a, b, c, d, e, f) #define COGL_FEATURE_FUNCTION(ret, name, args) \ - ret (* pf_ ## name) args; + ret (APIENTRY * pf_ ## name) args; #define COGL_FEATURE_END() diff --git a/cogl/driver/gles/cogl-context-driver.h b/cogl/driver/gles/cogl-context-driver.h index d200d1f8f..75960f15b 100644 --- a/cogl/driver/gles/cogl-context-driver.h +++ b/cogl/driver/gles/cogl-context-driver.h @@ -27,10 +27,14 @@ #include "cogl.h" #include "cogl-gles2-wrapper.h" +#ifndef APIENTRY +#define APIENTRY +#endif + #define COGL_FEATURE_BEGIN(a, b, c, d, e, f) #define COGL_FEATURE_FUNCTION(ret, name, args) \ - ret (* pf_ ## name) args; + ret (APIENTRY * pf_ ## name) args; #define COGL_FEATURE_END()