From 501290da027d9ce852c7800e9cb8a14468fa240f Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 20 Dec 2014 18:43:11 +0100 Subject: 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. --- video/out/gl_osd.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'video/out/gl_osd.h') 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, -- cgit v1.2.3