diff options
author | wm4 <wm4@nowhere> | 2013-03-28 21:44:27 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-03-28 21:46:17 +0100 |
commit | 8099cbe9dd64f48050918242e088a1f998c77a15 (patch) | |
tree | 76abcee94beef81308e3d9f871161f3595006a21 /video/out/gl_video.h | |
parent | 69c4baad91b953afbd0ea9b76b57a7040812bb24 (diff) | |
download | mpv-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/gl_video.h')
-rw-r--r-- | video/out/gl_video.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/video/out/gl_video.h b/video/out/gl_video.h index d4de02ba0f..985db9b9cc 100644 --- a/video/out/gl_video.h +++ b/video/out/gl_video.h @@ -40,6 +40,7 @@ struct gl_video_opts { int dither_depth; int fbo_format; int stereo_mode; + int enable_alpha; }; extern const struct m_sub_options gl_video_conf; |