User context EGL fixes.

This commit is contained in:
Doug Binks 2020-07-15 14:31:05 +01:00
parent 5f52f2a7f8
commit e55a552eee

View File

@ -374,6 +374,8 @@ GLFWbool _glfwInitEGL(void)
_glfw_dlsym(_glfw.egl.handle, "eglGetProcAddress"); _glfw_dlsym(_glfw.egl.handle, "eglGetProcAddress");
_glfw.egl.CreatePbufferSurface = (PFN_eglCreatePbufferSurface) _glfw.egl.CreatePbufferSurface = (PFN_eglCreatePbufferSurface)
_glfw_dlsym(_glfw.egl.handle, "eglCreatePbufferSurface"); _glfw_dlsym(_glfw.egl.handle, "eglCreatePbufferSurface");
_glfw.egl.ChooseConfig = (PFN_eglChooseConfig)
_glfw_dlsym(_glfw.egl.handle, "eglChooseConfig");
if (!_glfw.egl.GetConfigAttrib || if (!_glfw.egl.GetConfigAttrib ||
!_glfw.egl.GetConfigs || !_glfw.egl.GetConfigs ||
@ -390,7 +392,9 @@ GLFWbool _glfwInitEGL(void)
!_glfw.egl.SwapBuffers || !_glfw.egl.SwapBuffers ||
!_glfw.egl.SwapInterval || !_glfw.egl.SwapInterval ||
!_glfw.egl.QueryString || !_glfw.egl.QueryString ||
!_glfw.egl.GetProcAddress) !_glfw.egl.GetProcAddress ||
!_glfw.egl.CreatePbufferSurface||
!_glfw.egl.ChooseConfig)
{ {
_glfwInputError(GLFW_PLATFORM_ERROR, _glfwInputError(GLFW_PLATFORM_ERROR,
"EGL: Failed to load required entry points"); "EGL: Failed to load required entry points");
@ -616,10 +620,9 @@ GLFWbool _glfwCreateContextForConfigEGL(_GLFWwindow* window,
setAttrib(EGL_NONE, EGL_NONE); setAttrib(EGL_NONE, EGL_NONE);
window->context.egl.handle = eglCreateContext(_glfw.egl.display, *context = eglCreateContext(_glfw.egl.display, window->context.egl.config, share, attribs);
window->context.egl.config, share, attribs);
if (window->context.egl.handle == EGL_NO_CONTEXT) if (*context == EGL_NO_CONTEXT)
{ {
_glfwInputError(GLFW_VERSION_UNAVAILABLE, _glfwInputError(GLFW_VERSION_UNAVAILABLE,
"EGL: Failed to create context: %s", "EGL: Failed to create context: %s",