summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/epoxy/gl.h5
-rw-r--r--src/dispatch_common.h1
-rwxr-xr-xsrc/gen_dispatch.py8
3 files changed, 9 insertions, 5 deletions
diff --git a/include/epoxy/gl.h b/include/epoxy/gl.h
index 8e0d2d1..c70a8d6 100644
--- a/include/epoxy/gl.h
+++ b/include/epoxy/gl.h
@@ -47,6 +47,7 @@ extern "C" {
/* APIENTRY and GLAPIENTRY are not used on Linux or Mac. */
#define APIENTRY
#define GLAPIENTRY
+#define EPOXYAPIENTRY
#define GLAPI
#else
#ifndef APIENTRY
@@ -57,6 +58,10 @@ extern "C" {
#define GLAPIENTRY APIENTRY
#endif
+#ifndef EPOXYAPIENTRY
+#define EPOXYAPIENTRY __declspec(dllimport)
+#endif
+
#ifndef GLAPI
#define GLAPI extern
#endif
diff --git a/src/dispatch_common.h b/src/dispatch_common.h
index d456066..7f317a4 100644
--- a/src/dispatch_common.h
+++ b/src/dispatch_common.h
@@ -27,6 +27,7 @@
#define PLATFORM_HAS_EGL 0
#define PLATFORM_HAS_GLX 0
#define PLATFORM_HAS_WGL 1
+#define EPOXYAPIENTRY __declspec(dllexport)
#elif defined(__APPLE__)
#define PLATFORM_HAS_EGL 0
#define PLATFORM_HAS_GLX 1
diff --git a/src/gen_dispatch.py b/src/gen_dispatch.py
index 496256d..4da840a 100755
--- a/src/gen_dispatch.py
+++ b/src/gen_dispatch.py
@@ -506,16 +506,14 @@ class Generator(object):
self.outln(' */')
self.outln('#ifdef _WIN32')
self.outln('#define EPOXY_FPTR(x) x')
- self.outln('#define EPOXY_FPTR_EXTERN')
self.outln('#else')
self.outln('#define EPOXY_FPTR(x) (*x)')
- self.outln('#define EPOXY_FPTR_EXTERN extern')
self.outln('#endif')
for func in self.sorted_functions:
- self.outln('EPOXY_FPTR_EXTERN {0} EPOXY_FPTR(epoxy_{1})({2});'.format(func.ret_type,
- func.name,
- func.args_decl))
+ self.outln('extern EPOXYAPIENTRY {0} EPOXY_FPTR(epoxy_{1})({2});'.format(func.ret_type,
+ func.name,
+ func.args_decl))
self.outln('')
for func in self.sorted_functions: