EGL: Try eglGetProcAddress before fallback method

This order matches what is done for every other context creation API
that has a similar fallback method.
This commit is contained in:
Camilla Löwy
2026-02-12 16:04:00 +01:00
parent f0b2992b3a
commit 3f14b6feed

View File

@@ -312,18 +312,19 @@ static int extensionSupportedEGL(const char* extension)
static GLFWglproc getProcAddressEGL(const char* procname)
{
const GLFWglproc proc = (GLFWglproc) eglGetProcAddress(procname);
if (proc)
return proc;
if (!_glfw.egl.KHR_get_all_proc_addresses)
{
_GLFWwindow* window = _glfwPlatformGetTls(&_glfw.contextSlot);
assert(window != NULL);
if (window->context.egl.client)
{
GLFWglproc proc = (GLFWglproc)
_glfwPlatformGetModuleSymbol(window->context.egl.client, procname);
if (proc)
return proc;
return _glfwPlatformGetModuleSymbol(window->context.egl.client, procname);
}
return eglGetProcAddress(procname);
return NULL;
}
static void destroyContextEGL(_GLFWwindow* window)