Commit b96cba4c authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

EGL: remove the dlopen() hack

It only worked for non-ES OpenGL and if the libGL development files
were installed (otherwise "libGL.so" does not exist). So let Mesa fix
their bugs and stop caring about them:
https://bugs.freedesktop.org/show_bug.cgi?id=34476

In the mean time, you can use VLC and EGL with:

 # LD_PRELOAD=/usr/lib/libGL.so vlc
parent 1508b1bf
......@@ -115,7 +115,7 @@ libegl_plugin_la_SOURCES = egl.c
libegl_plugin_la_CFLAGS = $(AM_CFLAGS) $(EGL_CFLAGS)
libegl_plugin_la_LIBADD = $(AM_LIBADD) $(EGL_LIBS)
if !HAVE_WIN32
libegl_plugin_la_LIBADD += -ldl $(X_LIBS) $(X_PRE_LIBS) -lX11
libegl_plugin_la_LIBADD += $(X_LIBS) $(X_PRE_LIBS) -lX11
endif
libegl_plugin_la_DEPENDENCIES =
EXTRA_LTLIBRARIES += libegl_plugin.la
......
......@@ -34,7 +34,6 @@
#include <vlc_vout_window.h>
#ifdef __unix__
# include <vlc_xlib.h>
# include <dlfcn.h>
#endif
/* Plugin callbacks */
......@@ -127,20 +126,6 @@ static int Open (vlc_object_t *obj, const struct gl_api *api)
gl->sys = sys;
sys->display = dpy;
#ifdef __unix__
/* XXX Explicit hack!
* Mesa EGL plugins (as of version 7.8.2) are not properly linked to
* libEGL.so even though they import some of its symbols. This is
* typically not a problem. Unfortunately, LibVLC loads plugins as
* RTLD_LOCAL so that they do not pollute the namespace. Then the
* libEGL symbols are not visible to EGL plugins, and the run-time
* linker exits the whole process. */
if (dlopen ("libEGL.so", RTLD_GLOBAL|RTLD_NOW) == NULL)
msg_Warn (gl, "libEGL cannot be loaded. Process might crash.");
if (dlopen ("libGL.so", RTLD_GLOBAL|RTLD_NOW) == NULL)
msg_Warn (gl, "libGL cannot be loaded. Process might crash.");
#endif
EGLint major, minor;
if (eglInitialize (dpy, &major, &minor) != EGL_TRUE)
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment