Windows uses a different calling convention than linux for their public API
(__stdcall vs __cdelc). Properly annotate the pointers until waffle becomes
aware how to deal with GL dispatch.

Signed-off-by: Emil Velikov <emil.l.veli...@gmail.com>
---
 examples/simple-x11-egl.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/examples/simple-x11-egl.c b/examples/simple-x11-egl.c
index ed26eaa..9e218ac 100644
--- a/examples/simple-x11-egl.c
+++ b/examples/simple-x11-egl.c
@@ -49,8 +49,16 @@ enum {
     GL_COLOR_BUFFER_BIT = 0x00004000,
 };
 
-static void (*glClearColor)(GLclampf red, GLclampf green, GLclampf blue, 
GLclampf alpha);
-static void (*glClear)(GLbitfield mask);
+#ifndef _WIN32
+#define APIENTRY
+#else
+#ifndef APIENTRY
+#define APIENTRY __stdcall
+#endif
+#endif
+
+static void (APIENTRY *glClearColor)(GLclampf red, GLclampf green, GLclampf 
blue, GLclampf alpha);
+static void (APIENTRY *glClear)(GLbitfield mask);
 
 // ---------------------------------------------
 
-- 
2.0.0

_______________________________________________
waffle mailing list
waffle@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/waffle

Reply via email to