From 8099cbe9dd64f48050918242e088a1f998c77a15 Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 28 Mar 2013 21:44:27 +0100 Subject: 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 --- DOCS/man/en/vo.rst | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'DOCS') diff --git a/DOCS/man/en/vo.rst b/DOCS/man/en/vo.rst index e3b8723966..dcfcb05278 100644 --- a/DOCS/man/en/vo.rst +++ b/DOCS/man/en/vo.rst @@ -430,6 +430,14 @@ opengl dimension. Default is 128x256x64. Sizes must be a power of two, and 256 at most. + alpha + Try to create a framebuffer with alpha component. This only makes sense + if the video contains alpha information (which is extremely rare). May + not be supported on all platforms. If alpha framebuffers are + unavailable, it silently falls back to a normal framebuffer. Note + that when using FBO indirections (such as with ``opengl-hq``), a FBO + format with alpha must be specified with the ``fbo-format`` option. + opengl-hq Same as ``opengl``, but with default settings for high quality rendering. -- cgit v1.2.3