x11: added a GLX version of X11 display filter

Conflicts:

	src/x11video.c
parent 15eecb2a
......@@ -166,7 +166,7 @@ AC_DEFUN([MS_CHECK_VIDEO],[
fi
AC_ARG_ENABLE(xv,
[ --enable-xv Enable xv supportl],
[ --enable-xv Enable xv support],
[case "${enableval}" in
yes) enable_xv=true ;;
no) enable_xv=false ;;
......@@ -183,6 +183,23 @@ AC_DEFUN([MS_CHECK_VIDEO],[
AC_MSG_ERROR([No X video output API found. Please install X11+Xv headers.])
fi
fi
AC_ARG_ENABLE(gl,
[ --enable-gl Enable GL rendering support],
[case "${enableval}" in
yes) enable_gl=true ;;
no) enable_gl=false ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-gl) ;;
esac],[enable_gl=false])
if test "$enable_gl" = "true"; then
AC_CHECK_HEADERS(GL/gl.h,[] ,[enable_gl=false])
AC_CHECK_HEADERS(GL/glx.h,[] ,[enable_gl=false],[
#include <GL/glx.h>
])
if test "$enable_gl" = "false" ; then
AC_MSG_ERROR([No GL/GLX API found. Please install GL and GLX headers.])
fi
fi
fi
AC_ARG_ENABLE(theora,
......@@ -241,6 +258,13 @@ AC_DEFUN([MS_CHECK_VIDEO],[
if test "$ios_found" = "yes" ; then
LIBS="$LIBS -framework AVFoundation -framework CoreVideo -framework CoreMedia"
fi
if test "$enable_gl" = "true"; then
VIDEO_LIBS="$VIDEO_LIBS -lGL"
VIDEO_CFLAGS="$VIDEO_CFLAGS $SDL_CFLAGS -DHAVE_GL"
fi
if test "$enable_xv" = "true"; then
VIDEO_CFLAGS="$VIDEO_CFLAGS $SDL_CFLAGS -DHAVE_XV"
fi
fi
AC_SUBST(VIDEO_CFLAGS)
......
......@@ -550,6 +550,7 @@ AM_CONDITIONAL(BUILD_WIN32_WCE, test "$mingw32ce_found" = "yes")
AM_CONDITIONAL(BUILD_FFMPEG, test "$ffmpeg" = "true")
AM_CONDITIONAL(BUILD_SDL,test "$sdl_found" = "true" )
AM_CONDITIONAL(BUILD_X11_XV, test "$enable_xv" = "true" )
AM_CONDITIONAL(BUILD_X11_GL, test "$enable_gl" = "true" )
dnl *********************************************
dnl setup oRTP dependency
......
......@@ -309,9 +309,9 @@ static bool_t load_shaders(GLuint* program, GLint* uniforms) {
GLuint vertShader, fragShader;
*program = glCreateProgram();
if (!compileShader(&vertShader, GL_VERTEX_SHADER, YUV2RGB_VERTEX_SHADER))
if (!compileShader(&vertShader, GL_VERTEX_SHADER, (const char*)yuv2rgb_vs))
return FALSE;
if (!compileShader(&fragShader, GL_FRAGMENT_SHADER, YUV2RGB_FRAGMENT_SHADER))
if (!compileShader(&fragShader, GL_FRAGMENT_SHADER, (const char*)yuv2rgb_fs))
return FALSE;
GL_OPERATION(glAttachShader(*program, vertShader))
......
This diff is collapsed.
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