Fix the path to the GL library on OS X.

macos/v1.5.9
Eric Anholt 11 years ago
parent 34d7b3d872
commit d82c5c33a6
  1. 11
      src/dispatch_common.c

@ -113,6 +113,13 @@ struct api {
/** dlopen() return value for libGL.so.1. */ /** dlopen() return value for libGL.so.1. */
void *glx_handle; void *glx_handle;
/**
* dlopen() return value for OS X's GL library.
*
* On linux, glx_handle is used instead.
*/
void *gl_handle;
/** dlopen() return value for libEGL.so.1 */ /** dlopen() return value for libEGL.so.1 */
void *egl_handle; void *egl_handle;
@ -328,6 +335,10 @@ epoxy_gl_dlsym(const char *name)
{ {
#ifdef _WIN32 #ifdef _WIN32
return GetProcAddress(LoadLibraryA("OPENGL32"), name); return GetProcAddress(LoadLibraryA("OPENGL32"), name);
#elif defined(__APPLE__)
return do_dlsym(&api.gl_handle,
"/System/Library/Frameworks/OpenGL.framework/Versions/Current/OpenGL",
name, true);
#else #else
/* There's no library for desktop GL support independent of GLX. */ /* There's no library for desktop GL support independent of GLX. */
return epoxy_glx_dlsym(name); return epoxy_glx_dlsym(name);

Loading…
Cancel
Save