Commit 902056ed authored by Adrien Maglo's avatar Adrien Maglo

EGL: add the OpenGL ES 2.0 support for android

parent 3de6ae03
......@@ -182,12 +182,19 @@ endif
### Android ###
libegl_android_plugin_la_SOURCES = egl.c
libegl_android_plugin_la_CFLAGS = $(AM_CFLAGS) $(EGL_CFLAGS) -DUSE_PLATFORM_ANDROID=1
libegl_android_plugin_la_LIBADD = $(EGL_LIBS)
libandroid_native_window_plugin_la_SOURCES = android/nativewindow.c
libandroid_native_window_plugin_la_CFLAGS = $(AM_CFLAGS)
libandroid_native_window_plugin_la_LIBADD = -ldl
if HAVE_ANDROID
vout_LTLIBRARIES += libandroid_native_window_plugin.la
if HAVE_EGL
vout_LTLIBRARIES += libegl_android_plugin.la
endif
endif
### Coloured ASCII art ###
......
......@@ -209,6 +209,15 @@ static int Open (vlc_object_t *obj, const struct gl_api *api)
window.native = wnd->handle.hwnd;
# endif
#elif defined (USE_PLATFORM_ANDROID)
if (wnd->type != VOUT_WINDOW_TYPE_ANDROID_NATIVE)
goto error;
# if USE_DEFAULT_PLATFORM
sys->display = eglGetDisplay(EGL_DEFAULT_DISPLAY);
window.native = wnd->handle.anativewindow;
# endif
#endif
if (sys->display == EGL_NO_DISPLAY)
......
......@@ -105,14 +105,14 @@ static vout_window_t *MakeWindow (vout_display_t *vd)
};
vout_window_t *wnd;
#ifdef _WIN32
#if defined(_WIN32)
cfg.type = VOUT_WINDOW_TYPE_HWND;
wnd = vout_display_NewWindow (vd, &cfg);
if (wnd != NULL)
return wnd;
#elif defined(__ANDROID__)
cfg.type = VOUT_WINDOW_TYPE_ANDROID_NATIVE;
#else
cfg.type = VOUT_WINDOW_TYPE_XID;
#endif
cfg.type = VOUT_WINDOW_TYPE_XID;
wnd = vout_display_NewWindow (vd, &cfg);
if (wnd != NULL)
return wnd;
......
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