Explorar el Código

Add support for EGL_KHR_get_all_proc_addresses

If EGL_KHR_get_all_proc_addresses extension is supported, then don't try
to load a separate client library. Instead, just use eglGetProcAddress
to load everything.

This can also avoid problems with trying to use OpenGL functions from
libGL.so.1 (which is the GLX library) when an EGL context is current.

Closes #871.
Kyle Brenneman hace 9 años
padre
commit
d590eb074f
Se han modificado 2 ficheros con 4 adiciones y 0 borrados
  1. 3 0
      src/egl_context.c
  2. 1 0
      src/egl_context.h

+ 3 - 0
src/egl_context.c

@@ -399,6 +399,8 @@ GLFWbool _glfwInitEGL(void)
         extensionSupportedEGL("EGL_KHR_create_context_no_error");
         extensionSupportedEGL("EGL_KHR_create_context_no_error");
     _glfw.egl.KHR_gl_colorspace =
     _glfw.egl.KHR_gl_colorspace =
         extensionSupportedEGL("EGL_KHR_gl_colorspace");
         extensionSupportedEGL("EGL_KHR_gl_colorspace");
+    _glfw.egl.KHR_get_all_proc_addresses =
+        extensionSupportedEGL("EGL_KHR_get_all_proc_addresses");
 
 
     return GLFW_TRUE;
     return GLFW_TRUE;
 }
 }
@@ -583,6 +585,7 @@ GLFWbool _glfwCreateContextEGL(_GLFWwindow* window,
     window->context.egl.config = config;
     window->context.egl.config = config;
 
 
     // Load the appropriate client library
     // Load the appropriate client library
+    if (!_glfw.egl.KHR_get_all_proc_addresses)
     {
     {
         int i;
         int i;
         const char** sonames;
         const char** sonames;

+ 1 - 0
src/egl_context.h

@@ -176,6 +176,7 @@ typedef struct _GLFWlibraryEGL
     GLFWbool        KHR_create_context;
     GLFWbool        KHR_create_context;
     GLFWbool        KHR_create_context_no_error;
     GLFWbool        KHR_create_context_no_error;
     GLFWbool        KHR_gl_colorspace;
     GLFWbool        KHR_gl_colorspace;
+    GLFWbool        KHR_get_all_proc_addresses;
 
 
     void*           handle;
     void*           handle;