Rémi Bernon (@rbernon) commented about dlls/winewayland.drv/opengl.c:
+static EGLDisplay egl_display; +static EGLint egl_version[2]; + +#define DECL_FUNCPTR(f) static __typeof__(f) * p_##f = NULL +DECL_FUNCPTR(eglGetDisplay); +DECL_FUNCPTR(eglGetError); +DECL_FUNCPTR(eglGetProcAddress); +DECL_FUNCPTR(eglInitialize); +#undef DECL_FUNCPTR + +static void* load_symbol(void *handle, const char *symbol) +{ + void *addr; + if (!(addr = dlsym(handle, symbol))) addr = p_eglGetProcAddress(symbol); + return addr; +} I think you should instead check and require the `EGL_KHR_client_get_all_proc_addresses` extension (though I don't know for sure how widely available it is, I think for now we can assume it is).
This will let you use `eglGetProcAddress` for everything, including for GL core functions, and will save you the trouble of having to check and load libGL separately. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/5177#note_62900