[vlc-devel] [PATCH 6/6] egl: add Wayland extended platform support
Rémi Denis-Courmont
remi at remlab.net
Wed Aug 27 23:31:32 CEST 2014
This enables OpenGL/GLES through Wayland.
---
modules/video_output/Modules.am | 8 ++++++++
modules/video_output/egl.c | 16 +++++++++++++++-
2 files changed, 23 insertions(+), 1 deletion(-)
diff --git a/modules/video_output/Modules.am b/modules/video_output/Modules.am
index 65cfb60..1a16e50 100644
--- a/modules/video_output/Modules.am
+++ b/modules/video_output/Modules.am
@@ -136,6 +136,14 @@ if HAVE_WAYLAND
vout_LTLIBRARIES += libwl_shell_surface_plugin.la
endif
+libegl_wl_plugin_la_SOURCES = egl.c
+libegl_wl_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) -DUSE_PLATFORM_WAYLAND=1
+libegl_wl_plugin_la_CFLAGS = $(AM_CFLAGS) $(EGL_CFLAGS) $(WAYLAND_EGL_CFLAGS)
+libegl_wl_plugin_la_LIBADD = $(EGL_LIBS) $(WAYLAND_EGL_LIBS)
+if HAVE_EGL
+vout_LTLIBRARIES += libegl_wl_plugin.la
+endif
+
libwl_egl_window_plugin_la_SOURCES = wl/egl_window.c
libwl_egl_window_plugin_la_CFLAGS = $(WAYLAND_EGL_CFLAGS)
libwl_egl_window_plugin_la_LIBADD = $(WAYLAND_EGL_LIBS)
diff --git a/modules/video_output/egl.c b/modules/video_output/egl.c
index 3db9b20..58c48d6 100644
--- a/modules/video_output/egl.c
+++ b/modules/video_output/egl.c
@@ -3,7 +3,7 @@
* @brief EGL OpenGL extension module
*/
/*****************************************************************************
- * Copyright © 2010-2011 Rémi Denis-Courmont
+ * Copyright © 2010-2014 Rémi Denis-Courmont
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
@@ -206,6 +206,20 @@ static int Open (vlc_object_t *obj, const struct gl_api *api)
}
# endif
+#elif defined (USE_PLATFORM_WAYLAND)
+ if (wnd->type != VOUT_WINDOW_TYPE_WAYLAND_EGL)
+ goto error;
+
+# ifdef EGL_EXT_platform_wayland
+ if (!CheckClientExt("EGL_EXT_platform_wayland"))
+ goto error;
+
+ window = wnd->handle.wl;
+ sys->display = GetDisplayEXT(EGL_PLATFORM_WAYLAND_EXT, wnd->display.wl,
+ NULL);
+ createSurface = CreateWindowSurfaceEXT;
+# endif
+
#elif defined (USE_PLATFORM_WIN32)
if (wnd->type != VOUT_WINDOW_TYPE_HWND)
goto error;
--
2.1.0
More information about the vlc-devel
mailing list