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

EGL: resync platforms with Khronos registry and rationalize build rules

parent 541705d1
......@@ -2926,6 +2926,13 @@ EXTEND_HELP_STRING([Video plugins:])
dnl
dnl OpenGL
dnl
PKG_CHECK_MODULES([EGL], [egl], [
have_egl="yes"
], [
have_egl="no"
])
AM_CONDITIONAL([HAVE_EGL], [test "${have_egl}" = "yes"])
PKG_CHECK_MODULES([GL], [gl], [
have_gl="yes"
], [
......@@ -2952,16 +2959,6 @@ PKG_ENABLE_MODULES_VLC([GLES2], [], [glesv2], [OpenGL ES v2 support], [disabled]
dnl OpenGL ES 1: depends on EGL 1.0
PKG_ENABLE_MODULES_VLC([GLES1], [], [glesv1_cm], [OpenGL ES v1 support], [disabled])
AC_ARG_ENABLE(egl,
[ --enable-egl OpenGL support through EGL (default disabled)],, [
enable_egl="no"
])
AS_IF([test "$enable_egl" != "no"], [
PKG_CHECK_MODULES([EGL], [egl], [
VLC_ADD_PLUGIN([egl])
])
])
dnl
dnl Xlib
dnl
......
......@@ -81,6 +81,10 @@ libxcb_window_plugin_la_CFLAGS = $(AM_CFLAGS) \
$(XPROTO_CFLAGS) $(XCB_CFLAGS) $(XCB_KEYSYMS_CFLAGS)
libxcb_window_plugin_la_LIBADD = $(XPROTO_LIBS) $(XCB_LIBS) $(XCB_KEYSYMS_LIBS)
libglx_plugin_la_SOURCES = glx.c
libglx_plugin_la_CFLAGS = $(AM_CFLAGS) $(GL_CFLAGS)
libglx_plugin_la_LIBADD = $(GL_LIBS) $(X_LIBS) $(X_PRE_LIBS) -lX11
if HAVE_XCB
noinst_LTLIBRARIES += libvlc_xcb_events.la
vout_LTLIBRARIES += libxcb_x11_plugin.la libxcb_window_plugin.la
......@@ -163,18 +167,13 @@ libegl_plugin_la_SOURCES = egl.c
libegl_plugin_la_CFLAGS = $(AM_CFLAGS) $(EGL_CFLAGS)
libegl_plugin_la_LIBADD = $(EGL_LIBS)
if !HAVE_WIN32
if !HAVE_DARWIN
if !HAVE_ANDROID
libegl_plugin_la_LIBADD += $(X_LIBS) $(X_PRE_LIBS) -lX11
endif
endif
libegl_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath '$(voutdir)'
EXTRA_LTLIBRARIES += libegl_plugin.la
vout_LTLIBRARIES += $(LTLIBegl)
### GLX ###
libglx_plugin_la_SOURCES = glx.c
libglx_plugin_la_CFLAGS = $(AM_CFLAGS) $(GL_CFLAGS)
libglx_plugin_la_LIBADD = $(GL_LIBS) $(X_LIBS) $(X_PRE_LIBS) -lX11
if HAVE_EGL
vout_LTLIBRARIES += libegl_plugin.la
endif
### Coloured ASCII art ###
libcaca_plugin_la_SOURCES = caca.c
......
......@@ -110,24 +110,19 @@ static int Open (vlc_object_t *obj, const struct gl_api *api)
{
vlc_gl_t *gl = (vlc_gl_t *)obj;
/* <EGL/eglplatform.h> defines the list and order of platforms */
/* http://www.khronos.org/registry/egl/api/EGL/eglplatform.h defines the
* list and order of EGL platforms. */
#if defined(_WIN32) || defined(__VC32__) \
&& !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
&& !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) /* Win32 and WinCE */
# define vlc_eglGetWindow(w) ((w)->handle.hwnd)
#elif defined(__WINSCW__) || defined(__SYMBIAN32__) /* Symbian */
# error Symbian EGL not supported.
#elif defined(WL_EGL_PLATFORM)
# error Wayland EGL not supported.
#elif defined(__GBM__)
# error Glamor EGL not supported.
#elif defined(ANDROID)
#elif defined(__ANDROID__) || defined(ANDROID)
# error Android EGL not supported
#elif defined(__unix__) /* X11 */
#elif defined(__unix__) /* X11 (tentative) */
# define vlc_eglGetWindow(w) ((w)->handle.xid)
/* EGL can only use the default X11 display */
if (gl->surface->display.x11 != NULL)
......
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