cogl: Use APIENTRY for GL function pointer declarations
authorNeil Roberts <neil@linux.intel.com>
Wed, 18 Nov 2009 19:09:10 +0000 (19:09 +0000)
committerNeil Roberts <neil@linux.intel.com>
Wed, 18 Nov 2009 19:24:09 +0000 (19:24 +0000)
This matters for platforms such as Windows that use a different
calling covention from the default for GL functions.

clutter/cogl/cogl/driver/gl/cogl-context-driver.h
clutter/cogl/cogl/driver/gles/cogl-context-driver.h

index 0f8baa7..58f4fe9 100644 (file)
 
 #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()
 
index d200d1f..75960f1 100644 (file)
 #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()