changeset 34375:5b44af093b2a

vo_gl stereo: allow swapping left and right view.
author reimar
date Fri, 23 Dec 2011 22:34:42 +0000
parents 09f2662d11cb
children fd7abb6f787a
files DOCS/man/en/mplayer.1 libvo/gl_common.c libvo/gl_common.h libvo/vo_gl.c
diffstat 4 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/DOCS/man/en/mplayer.1	Fri Dec 23 21:52:04 2011 +0000
+++ b/DOCS/man/en/mplayer.1	Fri Dec 23 22:34:42 2011 +0000
@@ -4272,6 +4272,7 @@
 .IPs stereo=<value>
 Select a method for stereo display.
 You may have to use \-aspect to fix the aspect value.
+Add 32 to swap left and right side.
 Experimental, do not expect too much from it.
 .RSss
 .IPs 0
--- a/libvo/gl_common.c	Fri Dec 23 21:52:04 2011 +0000
+++ b/libvo/gl_common.c	Fri Dec 23 22:34:42 2011 +0000
@@ -1590,6 +1590,8 @@
 
 void glEnable3DLeft(int type) {
   GLint buffer;
+  if (type & GL_3D_SWAP)
+    return glEnable3DRight(type & ~GL_3D_SWAP);
   switch (type) {
     case GL_3D_RED_CYAN:
       mpglColorMask(GL_TRUE,  GL_FALSE, GL_FALSE, GL_FALSE);
@@ -1618,6 +1620,8 @@
 
 void glEnable3DRight(int type) {
   GLint buffer;
+  if (type & GL_3D_SWAP)
+    return glEnable3DLeft(type & ~GL_3D_SWAP);
   switch (type) {
     case GL_3D_RED_CYAN:
       mpglColorMask(GL_FALSE, GL_TRUE,  GL_TRUE,  GL_FALSE);
--- a/libvo/gl_common.h	Fri Dec 23 21:52:04 2011 +0000
+++ b/libvo/gl_common.h	Fri Dec 23 22:34:42 2011 +0000
@@ -386,6 +386,7 @@
 void glEnableYUVConversion(GLenum target, int type);
 void glDisableYUVConversion(GLenum target, int type);
 
+#define GL_3D_SWAP           32
 #define GL_3D_RED_CYAN        1
 #define GL_3D_GREEN_MAGENTA   2
 #define GL_3D_QUADBUFFER      3
--- a/libvo/vo_gl.c	Fri Dec 23 21:52:04 2011 +0000
+++ b/libvo/vo_gl.c	Fri Dec 23 22:34:42 2011 +0000
@@ -1292,7 +1292,7 @@
               "    generate mipmaps for the video image (use with TXB in customprog)\n"
               "  osdcolor=<0xAARRGGBB>\n"
               "    use the given color for the OSD\n"
-              "  stereo=<n>\n"
+              "  stereo=<n> (add 32 to swap left and right)\n"
               "    0: normal display\n"
               "    1: side-by-side to red-cyan stereo\n"
               "    2: side-by-side to green-magenta stereo\n"