From 4682b0147e66f2e9b573510ae21f701a851d355a Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 10 Nov 2015 14:36:23 +0100 Subject: vo_opengl: move the glFlush() call to the renderer --- video/out/opengl/video.c | 5 +++++ video/out/vo_opengl.c | 5 ----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/video/out/opengl/video.c b/video/out/opengl/video.c index 5ed831bfe5..a89ee4e73a 100644 --- a/video/out/opengl/video.c +++ b/video/out/opengl/video.c @@ -2202,6 +2202,11 @@ void gl_video_render_frame(struct gl_video *p, struct vo_frame *frame, int fbo) gl->UseProgram(0); gl->BindFramebuffer(GL_FRAMEBUFFER, 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(); + p->frames_rendered++; } diff --git a/video/out/vo_opengl.c b/video/out/vo_opengl.c index ccd52cde69..23a22a3f7e 100644 --- a/video/out/vo_opengl.c +++ b/video/out/vo_opengl.c @@ -136,11 +136,6 @@ static void draw_frame(struct vo *vo, struct vo_frame *frame) gl_video_render_frame(p->renderer, frame, 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(); - if (p->use_glFinish) gl->Finish(); } -- cgit v1.2.3