From ee3c948fe1643ad41f748cfa5ace7560d9cc1394 Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 11 Mar 2013 00:44:27 +0100 Subject: [PATCH] vo_gl3: call glFlush() after frame drawing is complete Call glFlush() after a frame has been drawn and we're going to only wait for the correct time before flipping it. Helps a little bit with stuttering with pans and "heavy" subtitles covering the screen. --- libvo/vo_gl3.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libvo/vo_gl3.c b/libvo/vo_gl3.c index 99a1380ca3..9647c85d15 100644 --- a/libvo/vo_gl3.c +++ b/libvo/vo_gl3.c @@ -1462,6 +1462,11 @@ static void draw_osd(struct vo *vo, struct osd_state *osd) gl->Disable(GL_BLEND); gl->BindTexture(GL_TEXTURE_2D, 0); } + + // 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(); } static void gen_eosd(struct gl_priv *p, mp_eosd_images_t *imgs) -- 2.11.4.GIT