libepoxy 1.2
[git/cygwin-packages/libepoxy.git] / 1.2-cygwin-dispatch.patch
1 --- origsrc/libepoxy-1.2/src/dispatch_common.c 2015-05-17 11:18:26.738020000 -0500
2 +++ src/libepoxy-1.2/src/dispatch_common.c 2015-05-17 10:39:30.933410400 -0500
3 @@ -104,8 +104,16 @@
4
5 #ifdef __APPLE__
6 #define GLX_LIB "/opt/X11/lib/libGL.1.dylib"
7 +#elif defined __CYGWIN__
8 +#define GLX_LIB "cygGL-1.dll"
9 +#define EGL_LIB "cygEGL-1.dll"
10 +#define ES1_LIB "cygGLESv1_CM-1.dll"
11 +#define ES2_LIB "cygGLESv2-2.dll"
12 #else
13 #define GLX_LIB "libGL.so.1"
14 +#define EGL_LIB "libEGL.so.1"
15 +#define ES1_LIB "libGLESv1_CM.so.1"
16 +#define ES2_LIB "libGLESv2.so.2"
17 #endif
18
19 struct api {
20 @@ -380,7 +388,7 @@ epoxy_current_context_is_glx(void)
21 return true;
22
23 #if PLATFORM_HAS_EGL
24 - sym = do_dlsym(&api.egl_handle, "libEGL.so.1", "eglGetCurrentContext",
25 + sym = do_dlsym(&api.egl_handle, EGL_LIB, "eglGetCurrentContext",
26 false);
27 if (sym && epoxy_egl_get_current_gl_context_api() != EGL_NONE)
28 return false;
29 @@ -416,7 +424,7 @@ epoxy_conservative_has_gl_extension(cons
30 void *
31 epoxy_egl_dlsym(const char *name)
32 {
33 - return do_dlsym(&api.egl_handle, "libEGL.so.1", name, true);
34 + return do_dlsym(&api.egl_handle, EGL_LIB, name, true);
35 }
36
37 void *
38 @@ -446,7 +454,7 @@ epoxy_gles1_dlsym(const char *name)
39 if (epoxy_current_context_is_glx()) {
40 return epoxy_get_proc_address(name);
41 } else {
42 - return do_dlsym(&api.gles1_handle, "libGLESv1_CM.so.1", name, true);
43 + return do_dlsym(&api.gles1_handle, ES1_LIB, name, true);
44 }
45 }
46
47 @@ -456,7 +464,7 @@ epoxy_gles2_dlsym(const char *name)
48 if (epoxy_current_context_is_glx()) {
49 return epoxy_get_proc_address(name);
50 } else {
51 - return do_dlsym(&api.gles2_handle, "libGLESv2.so.2", name, true);
52 + return do_dlsym(&api.gles2_handle, ES2_LIB, name, true);
53 }
54 }
55
56 @@ -476,7 +484,7 @@ epoxy_gles3_dlsym(const char *name)
57 if (epoxy_current_context_is_glx()) {
58 return epoxy_get_proc_address(name);
59 } else {
60 - void *func = do_dlsym(&api.gles2_handle, "libGLESv2.so.2", name, false);
61 + void *func = do_dlsym(&api.gles2_handle, ES2_LIB, name, false);
62
63 if (func)
64 return func;
65 @@ -564,7 +572,7 @@ epoxy_get_bootstrap_proc_address(const c
66 * non-X11 ES2 context from loading a bunch of X11 junk).
67 */
68 #if PLATFORM_HAS_EGL
69 - get_dlopen_handle(&api.egl_handle, "libEGL.so.1", false);
70 + get_dlopen_handle(&api.egl_handle, EGL_LIB, false);
71 if (api.egl_handle) {
72 switch (epoxy_egl_get_current_gl_context_api()) {
73 case EGL_OPENGL_API:
74 @@ -575,7 +583,7 @@ epoxy_get_bootstrap_proc_address(const c
75 * us. Try the GLES2 implementation first, and fall back
76 * to GLES1 otherwise.
77 */
78 - get_dlopen_handle(&api.gles2_handle, "libGLESv2.so.2", false);
79 + get_dlopen_handle(&api.gles2_handle, ES2_LIB, false);
80 if (api.gles2_handle)
81 return epoxy_gles2_dlsym(name);
82 else
This page took 0.038708 seconds and 5 git commands to generate.