mirror of
https://github.com/glfw/glfw.git
synced 2026-09-23 00:59:48 +00:00
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:
+8
-7
@@ -311,19 +311,20 @@ static int extensionSupportedEGL(const char* extension)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static GLFWglproc getProcAddressEGL(const char* procname)
|
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);
|
_GLFWwindow* window = _glfwPlatformGetTls(&_glfw.contextSlot);
|
||||||
assert(window != NULL);
|
assert(window != NULL);
|
||||||
|
|
||||||
if (window->context.egl.client)
|
return _glfwPlatformGetModuleSymbol(window->context.egl.client, procname);
|
||||||
{
|
|
||||||
GLFWglproc proc = (GLFWglproc)
|
|
||||||
_glfwPlatformGetModuleSymbol(window->context.egl.client, procname);
|
|
||||||
if (proc)
|
|
||||||
return proc;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return eglGetProcAddress(procname);
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void destroyContextEGL(_GLFWwindow* window)
|
static void destroyContextEGL(_GLFWwindow* window)
|
||||||
|
|||||||
Reference in New Issue
Block a user