summaryrefslogtreecommitdiffstats
path: root/video/out/vo.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-03-28 21:44:27 +0100
committerwm4 <wm4@nowhere>2013-03-28 21:46:17 +0100
commit8099cbe9dd64f48050918242e088a1f998c77a15 (patch)
tree76abcee94beef81308e3d9f871161f3595006a21 /video/out/vo.h
parent69c4baad91b953afbd0ea9b76b57a7040812bb24 (diff)
downloadmpv-8099cbe9dd64f48050918242e088a1f998c77a15.tar.bz2
mpv-8099cbe9dd64f48050918242e088a1f998c77a15.tar.xz
vo_opengl: add alpha output
Allows playing video with alpha information on X11, as long as the video contains alpha and the window manager does compositing. See vo.rst. Whether a window can be transparent is decided by the choice of the X Visual used for window creation. Unfortunately, there's no direct way to request such a Visual through the GLX or the X API, and use of the XRender extension is required to find out whether a Visual implies a framebuffer with alpha used by XRender (see for example [1]). Instead of depending on the XRender wrapper library (which would require annoying configure checks, even though XRender is virtually always supported), use a simple heuristics to find out whether a Visual has alpha. Since getting it wrong just means an optional feature will not work as expected, we consider this ok. [1] http://stackoverflow.com/questions/4052940/how-to-make-an-opengl- rendering-context-with-transparent-background/9215724#9215724
Diffstat (limited to 'video/out/vo.h')
-rw-r--r--video/out/vo.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/video/out/vo.h b/video/out/vo.h
index 646f2863a0..f3a182a1ab 100644
--- a/video/out/vo.h
+++ b/video/out/vo.h
@@ -120,6 +120,7 @@ typedef struct {
#define VOFLAG_HIDDEN 0x10 //< Use to create a hidden window
#define VOFLAG_STEREO 0x20 //< Use to create a stereo-capable window
#define VOFLAG_GL_DEBUG 0x40 // Hint to request debug OpenGL context
+#define VOFLAG_ALPHA 0x80 // Hint to request alpha framebuffer
typedef struct vo_info_s
{