summaryrefslogtreecommitdiff
path: root/src/dispatch_common.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/dispatch_common.h')
-rw-r--r--src/dispatch_common.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/dispatch_common.h b/src/dispatch_common.h
index 45b6c45..73bbb1d 100644
--- a/src/dispatch_common.h
+++ b/src/dispatch_common.h
@@ -58,6 +58,18 @@
# endif
#endif
+/* On win32, we're going to need to keep a per-thread dispatch table,
+ * since the function pointers depend on the device and pixel format
+ * of the current context.
+ */
+#if defined(_WIN32)
+#define USING_DISPATCH_TABLE 1
+#define UNWRAPPED_PROTO(x) x
+#else
+#define USING_DISPATCH_TABLE 0
+#define UNWRAPPED_PROTO(x) (*x)
+#endif
+
void *epoxy_egl_dlsym(const char *name);
void *epoxy_glx_dlsym(const char *name);
void *epoxy_gl_dlsym(const char *name);
@@ -79,5 +91,5 @@ void epoxy_print_failure_reasons(const char *name,
bool epoxy_extension_in_string(const char *extension_list, const char *ext);
-void epoxy_glBegin_unwrapped(GLenum primtype);
-void epoxy_glEnd_unwrapped(void);
+void UNWRAPPED_PROTO(epoxy_glBegin_unwrapped)(GLenum primtype);
+void UNWRAPPED_PROTO(epoxy_glEnd_unwrapped)(void);