# HG changeset patch # User reimar # Date 1324679682 0 # Node ID 5b44af093b2a7da89543f3daacb3f1398252b7d1 # Parent 09f2662d11cbe7ce89c0aa72bdb74cc9314ec8ec vo_gl stereo: allow swapping left and right view. diff -r 09f2662d11cb -r 5b44af093b2a DOCS/man/en/mplayer.1 --- 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= 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 diff -r 09f2662d11cb -r 5b44af093b2a libvo/gl_common.c --- 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); diff -r 09f2662d11cb -r 5b44af093b2a libvo/gl_common.h --- 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 diff -r 09f2662d11cb -r 5b44af093b2a libvo/vo_gl.c --- 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" + " stereo= (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"