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

Partial support for Mesa GL ES v1 and v2

v1 does not work and v2 does not compile but nevermind...
parent 3c762ac1
......@@ -3247,8 +3247,11 @@ AC_SUBST([GL_CFLAGS])
AC_SUBST([GL_LIBS])
dnl
dnl EGL
dnl OpenGL
dnl
PKG_ENABLE_MODULES_VLC([GL], [], [gl], [OpenGL support], [auto])
PKG_ENABLE_MODULES_VLC([GLES1], [], [glesv1_cm], [OpenGL ES v1 support], [auto])
PKG_ENABLE_MODULES_VLC([GLES2], [], [glesv2], [OpenGL ES v2 support], [auto])
PKG_ENABLE_MODULES_VLC([EGL], [], [egl], [EGL support], [auto])
dnl
......
......@@ -15,16 +15,33 @@ SOURCES_yuv = yuv.c
SOURCES_vout_macosx = macosx.m opengl.h opengl.c
SOURCES_vout_ios = ios.m opengl.h opengl.c
### OpenGL ###
# TODO: merge all three source files (?)
libopengl_plugin_la_SOURCES = \
opengl.c opengl.h \
gl.c
libopengl_plugin_la_CFLAGS = $(AM_CFLAGS) $(GL_CFLAGS)
libopengl_plugin_la_LIBADD = $(AM_LIBADD) $(GL_LIBS)
libopengl_plugin_la_DEPENDENCIES =
EXTRA_LTLIBRARIES += libopengl_plugin.la
libvlc_LTLIBRARIES += $(LTLIBopengl)
libgles2_plugin_la_SOURCES = opengl.c opengl.h gl.c
libgles2_plugin_la_CFLAGS = $(AM_CFLAGS) $(GLES2_CFLAGS) -DUSE_OPENGL_ES=2
libgles2_plugin_la_LIBADD = $(AM_LIBADD) $(GLES2_LIBS)
libgles2_plugin_la_DEPENDENCIES =
libgles1_plugin_la_SOURCES = opengl.c opengl.h gl.c
libgles1_plugin_la_CFLAGS = $(AM_CFLAGS) $(GLES1_CFLAGS) -DUSE_OPENGL_ES=1
libgles1_plugin_la_LIBADD = $(AM_LIBADD) $(GLES1_LIBS)
libgles1_plugin_la_DEPENDENCIES =
libgl_plugin_la_SOURCES = opengl.c opengl.h gl.c
libgl_plugin_la_CFLAGS = $(AM_CFLAGS) $(GL_CFLAGS)
libgl_plugin_la_LIBADD = $(AM_LIBADD) $(GL_LIBS)
libgl_plugin_la_DEPENDENCIES =
EXTRA_LTLIBRARIES += \
libgles2_plugin.la \
libgles1_plugin.la \
libgl_plugin.la
libvlc_LTLIBRARIES += \
$(LTLIBgles2) \
$(LTLIBgles1) \
$(LTLIBgl)
### XCB ###
libxcb_x11_plugin_la_SOURCES = \
......
......@@ -32,13 +32,23 @@
#include "opengl.h"
// Define USE_OPENGL_ES to the GL ES Version you want to select
#if USE_OPENGL_ES == 1
# include <OpenGLES/ES1/glext.h>
#elif USE_OPENGL_ES == 2
# include <OpenGLES/ES2/glext.h>
#elif defined(__APPLE__)
#if !defined (__APPLE__)
# if USE_OPENGL_ES == 2
# include <GLES2/gl2ext.h>
# elif USE_OPENGL_ES == 1
# include <GLES/glext.h>
//# else
//# include <GL/glext.h>
# endif
#else
# if USE_OPENGL_ES == 2
# include <OpenGLES/ES2/gl.h>
# elif USE_OPENGL_ES == 1
# include <OpenGLES/ES1/gl.h>
# else
# define MACOS_OPENGL
# include <OpenGL/glext.h>
# endif
#endif
#ifndef YCBCR_MESA
......
......@@ -36,17 +36,25 @@
#define VLCGL_TEXTURE_COUNT 1
#if USE_OPENGL_ES == 1
# include <OpenGLES/ES1/gl.h>
#elif USE_OPENGL_ES == 2
#if !defined (__APPLE__)
# if USE_OPENGL_ES == 2
# include <GLES2/gl2.h>
# elif USE_OPENGL_ES == 1
# include <GLES/gl.h>
# else
# include <GL/gl.h>
# endif
#else
# if USE_OPENGL_ES == 2
# include <OpenGLES/ES2/gl.h>
#elif defined(__APPLE__)
# elif USE_OPENGL_ES == 1
# include <OpenGLES/ES1/gl.h>
# else
# define MACOS_OPENGL
# include <OpenGL/gl.h>
# undef VLCGL_TEXTURE_COUNT
# define VLCGL_TEXTURE_COUNT 2
#else
# include <GL/gl.h>
# endif
#endif
typedef struct {
......
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