Skip to content

Commit be2ca80

Browse files
committed
Fix EGL support on macOS
EGL is available on macOS via ANGLE. Use the dylibs provided by it and ensure EGL is enabled in the code when it is in the build.
1 parent 167802b commit be2ca80

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/dispatch_common.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,9 +175,10 @@
175175

176176
#if defined(__APPLE__)
177177
#define GLX_LIB "/opt/X11/lib/libGL.1.dylib"
178+
#define EGL_LIB "libEGL.dylib"
179+
#define GLES1_LIB "libGLESv1_CM.dylib"
180+
#define GLES2_LIB "libGLESv2.dylib"
178181
#define OPENGL_LIB "/System/Library/Frameworks/OpenGL.framework/Versions/Current/OpenGL"
179-
#define GLES1_LIB "libGLESv1_CM.so"
180-
#define GLES2_LIB "libGLESv2.so"
181182
#elif defined(__ANDROID__)
182183
#define GLX_LIB "libGLESv2.so"
183184
#define EGL_LIB "libEGL.so"

src/dispatch_common.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
#define PLATFORM_HAS_GLX ENABLE_GLX
2929
#define PLATFORM_HAS_WGL 1
3030
#elif defined(__APPLE__)
31-
#define PLATFORM_HAS_EGL 0
31+
#define PLATFORM_HAS_EGL ENABLE_EGL
3232
#define PLATFORM_HAS_GLX ENABLE_GLX
3333
#define PLATFORM_HAS_WGL 0
3434
#elif defined(ANDROID)

0 commit comments

Comments
 (0)