From b1be668b9d6ccfc3e3af67eb52487d56c5d1f360 Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 11 Mar 2013 00:44:27 +0100 Subject: vo_opengl: insert a magical glFlush call Helps a little bit with stuttering with pans and "heavy" subtitles covering the screen. --- video/out/vo_opengl.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'video') diff --git a/video/out/vo_opengl.c b/video/out/vo_opengl.c index a53a1c90d2..398ad1b20b 100644 --- a/video/out/vo_opengl.c +++ b/video/out/vo_opengl.c @@ -1388,9 +1388,15 @@ static void draw_osd_cb(void *ctx, struct sub_bitmaps *imgs) static void draw_osd(struct vo *vo, struct osd_state *osd) { struct gl_priv *p = vo->priv; + GL *gl = p->gl; assert(p->osd); osd_draw(osd, p->osd_rect, osd->vo_pts, 0, p->osd->formats, draw_osd_cb, p); + + // The playloop calls this last before waiting some time until it decides + // to call flip_page(). Tell OpenGL to start execution of the GPU commands + // while we sleep (this happens asynchronously). + gl->Flush(); } // Disable features that are not supported with the current OpenGL version. -- cgit v1.2.3