summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2013-12-17 10:51:38 -0800
committerEric Anholt <eric@anholt.net>2013-12-17 12:10:34 -0800
commit8022cda75d65f537c48d4b43b44879abe558c1b7 (patch)
tree0260b4875584fcb9a7033d71948bc71a436cf67c /src
parent920543faa4d789aa2417331a77bb8383574efab0 (diff)
Don't forget to tell our users that the epoxy GL functions are __dllimport.
This lets the compiler generate faster function calls (call through function pointer, instead of call into a linker-generated stub func containing jump to function pointer).
Diffstat (limited to 'src')
-rw-r--r--src/dispatch_common.h1
-rwxr-xr-xsrc/gen_dispatch.py8
2 files changed, 4 insertions, 5 deletions
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: