diff options
author | wm4 <wm4@nowhere> | 2014-12-18 14:46:19 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-12-18 14:46:59 +0100 |
commit | 541f6731a02c9b1b82770630a159a76e75c060ef (patch) | |
tree | 679784d130f3b4d482a62887d6687eaaacb09087 /video/out/gl_osd.c | |
parent | d910a0faa82f064ebe0cfbae56a9c82a0c18f32f (diff) | |
download | mpv-541f6731a02c9b1b82770630a159a76e75c060ef.tar.bz2 mpv-541f6731a02c9b1b82770630a159a76e75c060ef.tar.xz |
vo_opengl: simplify the case without texture_rg
If GL_RED was not available, we used GL_ALPHA. But this is an
unnecessary complication, and it's easier to use GL_LUMINANCE instead.
With the latter, a texture will return the .r component set, and as long
as the shader doesn't look at the other components, the shader doesn't
need any changes.
Some of the changes added in 0e8fbdbd are now unneeeded.
Also, realign the entire gl_byte_formats_legacy table.
Diffstat (limited to 'video/out/gl_osd.c')
-rw-r--r-- | video/out/gl_osd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/video/out/gl_osd.c b/video/out/gl_osd.c index 2276dc9f71..f0917c364e 100644 --- a/video/out/gl_osd.c +++ b/video/out/gl_osd.c @@ -48,8 +48,8 @@ static const struct osd_fmt_entry osd_to_gles3_formats[SUBBITMAP_COUNT] = { }; static const struct osd_fmt_entry osd_to_gl_legacy_formats[SUBBITMAP_COUNT] = { - [SUBBITMAP_LIBASS] = {GL_ALPHA, GL_ALPHA, GL_UNSIGNED_BYTE}, - [SUBBITMAP_RGBA] = {GL_RGBA, GL_BGRA, GL_UNSIGNED_BYTE}, + [SUBBITMAP_LIBASS] = {GL_LUMINANCE, GL_LUMINANCE, GL_UNSIGNED_BYTE}, + [SUBBITMAP_RGBA] = {GL_RGBA, GL_BGRA, GL_UNSIGNED_BYTE}, }; struct mpgl_osd *mpgl_osd_init(GL *gl, struct mp_log *log, struct osd_state *osd) |