c: Try loading OpenGL through EGL if GLX isn't available
On a UNIX system without X11 libraries, it's impossible to have libGL.so and glXGetProcAddressARB(). Currently GLAD would fail to load GL symbols in this case.
Try also loading libEGL.so/libEGL.so.1 in OpenGL loader and fallback to eglGetProcAddress() to query GL symbols if glXGetProcAddressARB() isn't available.
Since EGL version 1.5 released in 2014, it's required for eglGetProcAddress() to be able to query all client API functions instead of only extensions, which is quite early for a Wayland-only display stack, thus no function check or another fallback logic is added.
合并状态:未合并 关闭于 2026-04-09 5 条评论