summaryrefslogtreecommitdiffstats
path: root/video/out/gl_common.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-01-28 13:36:07 +0100
committerwm4 <wm4@nowhere>2015-01-28 13:36:07 +0100
commitf3c84a322d46a80e624707a7e16b5caed31fb5b0 (patch)
treec2d20b7e2ffd72326a98911088d079fd1ae5c837 /video/out/gl_common.h
parent631c256819a0162f50f7986bd129c52897e86139 (diff)
downloadmpv-f3c84a322d46a80e624707a7e16b5caed31fb5b0.tar.bz2
mpv-f3c84a322d46a80e624707a7e16b5caed31fb5b0.tar.xz
vo_opengl: fix display of ARGB ith color management enabled
PNG uses a different component order from GL_RGBA, so we upload the surface using the "wrong" order, and then fix it in the shader. This breaks if a sRGB texture (GL_SRGB) is used: the hardware will not touch the alpha channel, which means that the B component is not adjusted, leading to incorrect output. Just remove the use of sRGB textures completely. It might lead to a slight slow down when playing RGB with color management enabled, but with this combination of obscure use case with minor performance impact it's not a meaningful disadvantage. Unfortunately this also means that alpha is handled incorrectly with our own color management, but alpha isn't so important and can be fixed later. (0.0 and 1.0 are unchanged by the transfer function, so it "mostly" works.) Fixes #1530.
Diffstat (limited to 'video/out/gl_common.h')
-rw-r--r--video/out/gl_common.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/video/out/gl_common.h b/video/out/gl_common.h
index ab15eed694..97e319556d 100644
--- a/video/out/gl_common.h
+++ b/video/out/gl_common.h
@@ -66,7 +66,6 @@ enum {
MPGL_CAP_ROW_LENGTH = (1 << 4), // GL_[UN]PACK_ROW_LENGTH
MPGL_CAP_FB = (1 << 5),
MPGL_CAP_VAO = (1 << 6),
- MPGL_CAP_SRGB_TEX = (1 << 7),
MPGL_CAP_FLOAT_TEX = (1 << 9),
MPGL_CAP_TEX_RG = (1 << 10), // GL_ARB_texture_rg / GL 3.x
MPGL_CAP_VDPAU = (1 << 11), // GL_NV_vdpau_interop