summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorJulien Isorce <julien.isorce@gmail.com>2015-07-06 00:52:06 +0100
committerJulien Isorce <julien.isorce@gmail.com>2015-07-27 09:03:58 +0100
commit5e4b94c1bbf530db49b56915154f4d9fabd09bec (patch)
tree845bc2c1eb266364693965c97eec8c54c4311ab5 /configure.ac
parent45f8a272117592ed72d9e5a0923085b893fd2a1a (diff)
downloadgstreamer-plugins-bad-5e4b94c1bbf530db49b56915154f4d9fabd09bec.tar.gz
gl: support cgl, egl and glx within a same build
On osx, with the same build, gst-launch-1.0 videotestsrc ! glimagesink works with: GST_GL_PLATFORM=egl GST_GL_WINDOW=x11 GST_GL_API=gles2 GST_GL_PLATFORM=egl GST_GL_WINDOW=x11 GST_GL_API=opengl GST_GL_PLATFORM=glx GST_GL_WINDOW=x11 GST_GL_API=opengl GST_GL_PLATFORM=cgl GST_GL_WINDOW=cocoa GST_GL_API=opengl GST_GL_PLATFORM=cgl GST_GL_WINDOW=cocoa GST_GL_API=opengl3 https://bugzilla.gnome.org/show_bug.cgi?id=752743
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac32
1 files changed, 22 insertions, 10 deletions
diff --git a/configure.ac b/configure.ac
index 00c7f0728..1e1ad87de 100644
--- a/configure.ac
+++ b/configure.ac
@@ -805,14 +805,14 @@ if test "x$HAVE_GL" = "xyes" -a "x$HAVE_GLES2" = "xyes"; then
#ifndef GL_GLEXT_PROTOTYPES
#define GL_GLEXT_PROTOTYPES 1
#endif
-# ifdef __APPLE__
+# ifdef HAVE_IOS
# include <OpenGLES/ES2/gl.h>
# include <OpenGLES/ES2/glext.h>
# else
# include <GLES2/gl2.h>
# include <GLES2/gl2ext.h>
# endif
-# if __APPLE__
+# ifdef __APPLE__
# include <OpenGL/OpenGL.h>
# include <OpenGL/gl.h>
# if MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
@@ -999,12 +999,6 @@ case $host in
if test "x$NEED_WGL" = "xyes"; then
AC_MSG_ERROR([WGL is not available on Mac OS X])
fi
- if test "x$NEED_EGL" = "xyes"; then
- AC_MSG_ERROR([EGL is not available on Mac OS X])
- fi
- if test "x$NEED_GLES2" = "xyes"; then
- AC_MSG_ERROR([OpenGL|ES 2.0 is not supported on your platform yet])
- fi
if test "x$NEED_COCOA" != "xno"; then
GL_LIBS="$LIBS -framework OpenGL -framework Cocoa -framework QuartzCore -framework CoreFoundation"
@@ -1030,6 +1024,24 @@ case $host in
USE_OPENGL=yes
fi
fi
+
+ if test "x$HAVE_EGL" = "xyes"; then
+ if test "x$NEED_EGL" != "xno"; then
+ if test "x$HAVE_WINDOW_X11" = "xyes"; then
+ GL_LIBS="$GL_LIBS -lEGL $EGL_LIBS"
+ GL_CFLAGS="$GL_CFLAGS $EGL_CFLAGS"
+ USE_EGL=yes
+ fi
+ fi
+ fi
+
+ dnl OpenGL|ES 2.0
+ if test "x$HAVE_GLES2" = "xyes"; then
+ if test "x$NEED_GLES2" != "xno"; then
+ GL_LIBS="$GL_LIBS -lGLESv2"
+ USE_GLES2=yes
+ fi
+ fi
fi
;;
*-mingw32*)
@@ -1237,7 +1249,7 @@ if test "x$USE_GLES2" = "xyes"; then
#ifndef GL_GLEXT_PROTOTYPES
#define GL_GLEXT_PROTOTYPES 1
#endif
-# ifdef __APPLE__
+# ifdef HAVE_IOS
# include <OpenGLES/ES2/gl.h>
# include <OpenGLES/ES2/glext.h>
# else
@@ -1249,7 +1261,7 @@ fi
if test "x$USE_OPENGL" = "xyes"; then
GL_INCLUDES="$GL_INCLUDES
-# if __APPLE__
+# ifdef __APPLE__
# include <OpenGL/OpenGL.h>
# include <OpenGL/gl.h>
# else