Disable EGL on OS X.

It doesn't exist.  There's EAGL, but that's not something we're
covering.
macos/v1.5.9
Eric Anholt 11 years ago
parent 940438fae3
commit 708c31a406
  1. 6
      configure.ac
  2. 14
      src/dispatch_common.c
  3. 4
      src/dispatch_common.h

@ -64,6 +64,12 @@ case $host_os in
# (like checking for EGL and GLX libs in non-windows.).
AC_SUBST([LOG_COMPILER], [wine])
;;
darwin*)
build_egl=no
build_glx=yes
build_wgl=no
EPOXY_LINK_LIBS=""
;;
*)
build_egl=yes
build_glx=yes

@ -310,7 +310,11 @@ epoxy_conservative_has_gl_extension(const char *ext)
void *
epoxy_egl_dlsym(const char *name)
{
#if PLATFORM_HAS_EGL
return do_dlsym(&api.egl_handle, "libEGL.so.1", name, true);
#else
return NULL;
#endif
}
void *
@ -365,7 +369,11 @@ epoxy_get_proc_address(const char *name)
return wglGetProcAddress(name);
#else
if (api.egl_handle) {
#if PLATFORM_HAS_EGL
return eglGetProcAddress(name);
#else
return NULL;
#endif
} else if (api.glx_handle) {
return glXGetProcAddressARB((const GLubyte *)name);
} else {
@ -377,16 +385,19 @@ epoxy_get_proc_address(const char *name)
* application's namespace, then use that.
*/
PFNGLXGETPROCADDRESSARBPROC glx_gpa;
PFNEGLGETPROCADDRESSPROC egl_gpa;
#if PLATFORM_HAS_EGL
PFNEGLGETPROCADDRESSPROC egl_gpa;
egl_gpa = dlsym(NULL, "eglGetProcAddress");
if (egl_gpa)
return egl_gpa(name);
#endif
glx_gpa = dlsym(NULL, "glXGetProcAddressARB");
if (glx_gpa)
return glx_gpa((const GLubyte *)name);
#if PLATFORM_HAS_EGL
/* OK, couldn't find anything in the app's address space.
* Presumably they dlopened with RTLD_LOCAL, which hides it
* from us. Just go dlopen()ing likely libraries and try them.
@ -395,6 +406,7 @@ epoxy_get_proc_address(const char *name)
false);
if (egl_gpa)
return egl_gpa(name);
#endif /* PLATFORM_HAS_EGL */
return do_dlsym(&api.glx_handle, "libGL.so.1", "glXGetProcAddressARB",
false);

@ -27,6 +27,10 @@
#define PLATFORM_HAS_EGL 0
#define PLATFORM_HAS_GLX 0
#define PLATFORM_HAS_WGL 1
#elif defined(__APPLE__)
#define PLATFORM_HAS_EGL 0
#define PLATFORM_HAS_GLX 1
#define PLATFORM_HAS_WGL 0
#else
#define PLATFORM_HAS_EGL 1
#define PLATFORM_HAS_GLX 1

Loading…
Cancel
Save