diff options
author | wm4 <wm4@nowhere> | 2014-12-20 18:43:11 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-12-20 18:43:11 +0100 |
commit | 501290da027d9ce852c7800e9cb8a14468fa240f (patch) | |
tree | 46f506e5244097d679913364142cd7d0680c63e1 /video/out/gl_osd.h | |
parent | 7d43a7ea840e752221c0da5cd99e11cf8b3fd834 (diff) | |
download | mpv-501290da027d9ce852c7800e9cb8a14468fa240f.tar.bz2 mpv-501290da027d9ce852c7800e9cb8a14468fa240f.tar.xz |
vo_opengl_old: fix OSD regression
Commit 0e8fbdbd removed the rg_texture requirement from vo_opengl;
commit 541f6731 changed to a more convenient method. Both commits broke
vo_opengl_old in some ways. vo_opengl_old always requires GL_ALPHA for
single-channel texture, because it draws the OSD without shaders and by
using certain blend modes.
So we need to explicitly distinguish between vo_opengl and vo_opengl_old
in the OSD renderer, and force fixed texture formats for vo_opengl_old.
The other logic is specific to the internals of vo_opengl. (Although it
might be possible to get the same result by playing with the old GL
fixed-function functions in vo_opengl_old. But seems like a waste of
time.)
Fixes #1370.
Diffstat (limited to 'video/out/gl_osd.h')
-rw-r--r-- | video/out/gl_osd.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/video/out/gl_osd.h b/video/out/gl_osd.h index c91cc1e53f..f05385b547 100644 --- a/video/out/gl_osd.h +++ b/video/out/gl_osd.h @@ -30,7 +30,8 @@ struct mpgl_osd { void *scratch; }; -struct mpgl_osd *mpgl_osd_init(GL *gl, struct mp_log *log, struct osd_state *osd); +struct mpgl_osd *mpgl_osd_init(GL *gl, struct mp_log *log, struct osd_state *osd, + bool legacy); void mpgl_osd_destroy(struct mpgl_osd *ctx); struct mpgl_osd_part *mpgl_osd_generate(struct mpgl_osd *ctx, |