summaryrefslogtreecommitdiffstats
path: root/video/out/opengl/video.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-07-22 21:46:59 +0200
committerwm4 <wm4@nowhere>2017-07-22 21:46:59 +0200
commit1c8131167334183ad24b90cbbf4fd86d3d5406cc (patch)
tree1ba04938ea85f2d7ef301a9242df807080391fc7 /video/out/opengl/video.c
parent2378acc3b3e9825765c549e025bc1ca83064cced (diff)
downloadmpv-1c8131167334183ad24b90cbbf4fd86d3d5406cc.tar.bz2
mpv-1c8131167334183ad24b90cbbf4fd86d3d5406cc.tar.xz
vo_opengl: osd: refactor and simplify
Reduce this to 1 draw call per OSD pass. This removes the need for some annoying special handling regarding 3D video support (we supported duplicating the OSD/subtitles for side-by-side 3D output etc.). Remove the unneeded texture sampler uniform thing.
Diffstat (limited to 'video/out/opengl/video.c')
-rw-r--r--video/out/opengl/video.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/video/out/opengl/video.c b/video/out/opengl/video.c
index 742c36850a..4b2c8ecc56 100644
--- a/video/out/opengl/video.c
+++ b/video/out/opengl/video.c
@@ -2411,7 +2411,8 @@ static void pass_draw_osd(struct gl_video *p, int draw_flags, double pts,
enum sub_bitmap_format fmt = mpgl_osd_get_part_format(p->osd, n);
if (!fmt)
continue;
- gl_sc_uniform_sampler(p->sc, "osdtex", GL_TEXTURE_2D, 0);
+ gl_sc_uniform_tex(p->sc, "osdtex", GL_TEXTURE_2D,
+ mpgl_osd_get_part_texture(p->osd, n));
switch (fmt) {
case SUBBITMAP_RGBA: {
pass_describe(p, "drawing osd (rgba)");