From 3f14b6feed2b66a70c08e73d5e17afa659b55648 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Camilla=20L=C3=B6wy?= Date: Thu, 12 Feb 2026 16:04:00 +0100 Subject: [PATCH] EGL: Try eglGetProcAddress before fallback method This order matches what is done for every other context creation API that has a similar fallback method. --- src/egl_context.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/egl_context.c b/src/egl_context.c index 4e59d78b..9aec5a2a 100644 --- a/src/egl_context.c +++ b/src/egl_context.c @@ -312,18 +312,19 @@ static int extensionSupportedEGL(const char* extension) static GLFWglproc getProcAddressEGL(const char* procname) { - _GLFWwindow* window = _glfwPlatformGetTls(&_glfw.contextSlot); - assert(window != NULL); + const GLFWglproc proc = (GLFWglproc) eglGetProcAddress(procname); + if (proc) + return proc; - if (window->context.egl.client) + if (!_glfw.egl.KHR_get_all_proc_addresses) { - GLFWglproc proc = (GLFWglproc) - _glfwPlatformGetModuleSymbol(window->context.egl.client, procname); - if (proc) - return proc; + _GLFWwindow* window = _glfwPlatformGetTls(&_glfw.contextSlot); + assert(window != NULL); + + return _glfwPlatformGetModuleSymbol(window->context.egl.client, procname); } - return eglGetProcAddress(procname); + return NULL; } static void destroyContextEGL(_GLFWwindow* window)