From e55a552eeef98d8a578d1ddfb4d5cf0a21073145 Mon Sep 17 00:00:00 2001 From: Doug Binks Date: Wed, 15 Jul 2020 14:31:05 +0100 Subject: [PATCH] User context EGL fixes. --- src/egl_context.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/egl_context.c b/src/egl_context.c index 5eb8eb47..bef5baa9 100644 --- a/src/egl_context.c +++ b/src/egl_context.c @@ -374,6 +374,8 @@ GLFWbool _glfwInitEGL(void) _glfw_dlsym(_glfw.egl.handle, "eglGetProcAddress"); _glfw.egl.CreatePbufferSurface = (PFN_eglCreatePbufferSurface) _glfw_dlsym(_glfw.egl.handle, "eglCreatePbufferSurface"); + _glfw.egl.ChooseConfig = (PFN_eglChooseConfig) + _glfw_dlsym(_glfw.egl.handle, "eglChooseConfig"); if (!_glfw.egl.GetConfigAttrib || !_glfw.egl.GetConfigs || @@ -390,7 +392,9 @@ GLFWbool _glfwInitEGL(void) !_glfw.egl.SwapBuffers || !_glfw.egl.SwapInterval || !_glfw.egl.QueryString || - !_glfw.egl.GetProcAddress) + !_glfw.egl.GetProcAddress || + !_glfw.egl.CreatePbufferSurface|| + !_glfw.egl.ChooseConfig) { _glfwInputError(GLFW_PLATFORM_ERROR, "EGL: Failed to load required entry points"); @@ -616,10 +620,9 @@ GLFWbool _glfwCreateContextForConfigEGL(_GLFWwindow* window, setAttrib(EGL_NONE, EGL_NONE); - window->context.egl.handle = eglCreateContext(_glfw.egl.display, - window->context.egl.config, share, attribs); + *context = eglCreateContext(_glfw.egl.display, window->context.egl.config, share, attribs); - if (window->context.egl.handle == EGL_NO_CONTEXT) + if (*context == EGL_NO_CONTEXT) { _glfwInputError(GLFW_VERSION_UNAVAILABLE, "EGL: Failed to create context: %s",