diff --git a/CMakeLists.txt b/CMakeLists.txt index ba257c95..232a1066 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -241,35 +241,6 @@ if (_GLFW_EGL) if (_GLFW_X11) set(GLFW_PKG_DEPS "${GLFW_PKG_DEPS} egl") - - include(CheckFunctionExists) - - check_function_exists(eglGetProcAddress _GLFW_HAS_EGLGETPROCADDRESS) - - if (NOT _GLFW_HAS_EGLGETPROCADDRESS) - message(WARNING "No eglGetProcAddress found") - - # Check for dlopen support as a fallback - - find_library(DL_LIBRARY dl) - mark_as_advanced(DL_LIBRARY) - if (DL_LIBRARY) - set(CMAKE_REQUIRED_LIBRARIES ${DL_LIBRARY}) - else() - set(CMAKE_REQUIRED_LIBRARIES "") - endif() - - check_function_exists(dlopen _GLFW_HAS_DLOPEN) - - if (NOT _GLFW_HAS_DLOPEN) - message(FATAL_ERROR "No entry point retrieval mechanism found") - endif() - - if (DL_LIBRARY) - list(APPEND glfw_LIBRARIES ${DL_LIBRARY}) - set(GLFW_PKG_LIBS "${GLFW_PKG_LIBS} -ldl") - endif() - endif() endif() endif() diff --git a/src/config.h.in b/src/config.h.in index d391fcdf..61178f98 100644 --- a/src/config.h.in +++ b/src/config.h.in @@ -72,9 +72,6 @@ // Define this to 1 if glXGetProcAddressEXT is available #cmakedefine _GLFW_HAS_GLXGETPROCADDRESSEXT -// Define this to 1 if eglGetProcAddress is available -#cmakedefine _GLFW_HAS_EGLGETPROCADDRESS - // The GLFW version as used by glfwGetVersionString #define _GLFW_VERSION_FULL "@GLFW_VERSION_FULL@" diff --git a/src/egl_context.c b/src/egl_context.c index 95a0ba22..9418f6f3 100644 --- a/src/egl_context.c +++ b/src/egl_context.c @@ -359,31 +359,6 @@ static int createContext(_GLFWwindow* window, int _glfwInitOpenGL(void) { -#ifdef _GLFW_DLOPEN_LIBEGL - int i; - char* libEGL_names[ ] = - { - "libEGL.so", - "libEGL.so.1", - "/usr/lib/libEGL.so", - "/usr/lib/libEGL.so.1", - NULL - }; - - for (i = 0; libEGL_names[i] != NULL; i++) - { - _glfw.egl.libEGL = dlopen(libEGL_names[i], RTLD_LAZY | RTLD_GLOBAL); - if (_glfw.egl.libEGL) - break; - } - - if (!_glfw.egl.libEGL) - { - _glfwInputError(GLFW_PLATFORM_ERROR, "EGL: Failed to find libEGL"); - return GL_FALSE; - } -#endif - _glfw.egl.display = eglGetDisplay(_GLFW_EGL_NATIVE_DISPLAY); if (_glfw.egl.display == EGL_NO_DISPLAY) { @@ -412,14 +387,6 @@ int _glfwInitOpenGL(void) void _glfwTerminateOpenGL(void) { -#ifdef _GLFW_DLOPEN_LIBEGL - if (_glfw.egl.libEGL != NULL) - { - dlclose(_glfw.egl.libEGL); - _glfw.egl.libEGL = NULL; - } -#endif - eglTerminate(_glfw.egl.display); } @@ -599,6 +566,6 @@ int _glfwPlatformExtensionSupported(const char* extension) GLFWglproc _glfwPlatformGetProcAddress(const char* procname) { - return _glfw_eglGetProcAddress(procname); + return eglGetProcAddress(procname); } diff --git a/src/egl_platform.h b/src/egl_platform.h index 6eeb9e5a..065b49f8 100644 --- a/src/egl_platform.h +++ b/src/egl_platform.h @@ -43,17 +43,6 @@ #include #endif -// We support two different ways for getting addresses for EGL -// extension functions: eglGetProcAddress and dlsym -#if defined(_GLFW_HAS_EGLGETPROCADDRESS) - #define _glfw_eglGetProcAddress(x) eglGetProcAddress(x) -#elif defined(_GLFW_HAS_DLOPEN) - #define _glfw_eglGetProcAddress(x) dlsym(_glfw.egl.libEGL, x) - #define _GLFW_DLOPEN_LIBEGL -#else - #error "No OpenGL entry point retrieval mechanism was enabled" -#endif - #define _GLFW_PLATFORM_CONTEXT_STATE _GLFWcontextEGL egl #define _GLFW_PLATFORM_LIBRARY_OPENGL_STATE _GLFWlibraryEGL egl @@ -87,9 +76,6 @@ typedef struct _GLFWlibraryEGL GLboolean KHR_create_context; -#if defined(_GLFW_DLOPEN_LIBEGL) - void* libEGL; // dlopen handle for libEGL.so -#endif } _GLFWlibraryEGL; diff --git a/src/x11_init.c b/src/x11_init.c index cffbc7cc..8fa155bb 100644 --- a/src/x11_init.c +++ b/src/x11_init.c @@ -708,12 +708,8 @@ const char* _glfwPlatformGetVersionString(void) " glXGetProcAddressARB" #elif defined(_GLFW_HAS_GLXGETPROCADDRESSEXT) " glXGetProcAddressEXT" -#elif defined(_GLFW_HAS_EGLGETPROCADDRESS) - " eglGetProcAddress" #elif defined(_GLFW_DLOPEN_LIBGL) " dlsym(libGL)" -#elif defined(_GLFW_DLOPEN_LIBEGL) - " dlsym(libEGL)" #else " no-extension-support" #endif