diff options
-rw-r--r-- | m4/summary.m4 | 3 | ||||
-rw-r--r-- | m4/video_out.m4 | 29 | ||||
-rw-r--r-- | src/video_out/Makefile.am | 8 |
3 files changed, 39 insertions, 1 deletions
diff --git a/m4/summary.m4 b/m4/summary.m4 index 49783252c..15fccdbf4 100644 --- a/m4/summary.m4 +++ b/m4/summary.m4 @@ -208,6 +208,9 @@ AC_DEFUN([XINE_LIB_SUMMARY], [ echo " - OpenGL" fi fi + if test x"$have_opengl2" = x"yes"; then + echo " - OpenGL 2.0 (with bicubic scaling)" + fi test x"$have_vdpau" = x"yes" && echo " - vdpau (X11 Video Decode and Presentation API for Unix)" if test x"$have_sunfb" = x"yes"; then if test x"$have_sundga" = x"yes"; then diff --git a/m4/video_out.m4 b/m4/video_out.m4 index a7fec05c5..aa8b311d5 100644 --- a/m4/video_out.m4 +++ b/m4/video_out.m4 @@ -202,6 +202,33 @@ AC_DEFUN([XINE_VIDEO_OUT_PLUGINS], [ AC_CHECK_LIB([GL], [glBegin], [AC_CHECK_HEADERS([GL/gl.h], [have_opengl=yes], [have_opengl=no])], [have_opengl=no], [$X_LIBS -lm]) + have_opengl2=$have_opengl + if test x"$have_opengl2" = x"yes" ; then + AC_MSG_CHECKING([for OpenGL 2.0]) + ac_save_LIBS="$LIBS" + LIBS="$LIBS $X_LIBS -lGL -lm" + AC_LINK_IFELSE(AC_LANG_PROGRAM([[ + #define GL_GLEXT_PROTOTYPES + #include <GL/gl.h> + #include <GL/glext.h> + #include <GL/glx.h> + ]],[[ + GLint i = 0; + /* GLX ARB 2.0 */ + glXGetProcAddressARB ("proc"); + /* GL_VERSION_1_5 */ + glDeleteBuffers (1024, &i); + /* GL_VERSION_2_0 */ + glCreateProgram (); + glCompileShader (1); + /* GL_ARB_framebuffer_object */ + glFramebufferTexture2D (GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_RECTANGLE_ARB, 2, 0); + /* GL_ARB_shader_objects */ + glGetUniformLocationARB (3, "tex");]]), + [have_opengl2=yes], [have_opengl2=no]) + LIBS="$ac_save_LIBS" + AC_MSG_RESULT($have_opengl2) + fi if test x"$hard_enable_opengl" = x"yes" && test x"$have_opengl" != x"yes"; then AC_MSG_ERROR([OpenGL support requested, but OpenGL not found]) elif test x"$have_opengl" = x"yes"; then @@ -234,7 +261,7 @@ AC_DEFUN([XINE_VIDEO_OUT_PLUGINS], [ AC_SUBST(GLU_LIBS) fi AM_CONDITIONAL([ENABLE_OPENGL], [test x"$have_opengl" = x"yes"]) - + AM_CONDITIONAL([ENABLE_OPENGL2], [test x"$have_opengl2" = x"yes"]) dnl SDL XINE_ARG_WITH([sdl], [Enable support for SDL video output]) diff --git a/src/video_out/Makefile.am b/src/video_out/Makefile.am index 2e0b456d7..18b2ef498 100644 --- a/src/video_out/Makefile.am +++ b/src/video_out/Makefile.am @@ -30,6 +30,9 @@ xxmc_module = xineplug_vo_out_xxmc.la endif if ENABLE_OPENGL opengl_module = xineplug_vo_out_opengl.la +if ENABLE_OPENGL2 +opengl2_module = xineplug_vo_out_opengl2.la +endif endif if ENABLE_SUNFB if ENABLE_SUNDGA @@ -104,6 +107,7 @@ YUV_LIBS = libyuv2rgb.la $(XINE_LIB) $(MLIB_LIBS) $(AVUTIL_LIBS) xineplug_LTLIBRARIES = $(xshm_module) $(xv_module) $(xvmc_module) \ $(opengl_module) \ + $(opengl2_module) \ $(pgx64_module) $(pgx32_module)\ $(vidix_module) \ $(aa_module) \ @@ -154,6 +158,10 @@ xineplug_vo_out_opengl_la_LIBADD = $(YUV_LIBS) $(OPENGL_LIBS) $(GLUT_LIBS) \ $(GLUT_LIBS) $(GLU_LIBS) $(X_LIBS) $(PTHREAD_LIBS) $(DYNAMIC_LD_LIBS) $(LTLIBINTL) xineplug_vo_out_opengl_la_CFLAGS = $(AM_CFLAGS) $(X_CFLAGS) $(AVUTIL_CFLAGS) -fno-strict-aliasing +xineplug_vo_out_opengl2_la_SOURCES = video_out_opengl2.c +xineplug_vo_out_opengl2_la_LIBADD = $(YUV_LIBS) $(OPENGL_LIBS) $(X_LIBS) $(PTHREAD_LIBS) $(DYNAMIC_LD_LIBS) $(LTLIBINTL) +xineplug_vo_out_opengl2_la_CFLAGS = $(AM_CFLAGS) $(X_CFLAGS) $(AVUTIL_CFLAGS) -fno-strict-aliasing + xineplug_vo_out_pgx64_la_SOURCES = video_out_pgx64.c xineplug_vo_out_pgx64_la_LIBADD = $(XINE_LIB) $(X_LIBS) $(SUNDGA_LIBS) $(PTHREAD_LIBS) $(LTLIBINTL) xineplug_vo_out_pgx64_la_CFLAGS = $(AM_CFLAGS) $(X_CFLAGS) |