mirror of
https://github.com/mpv-player/mpv
synced 2025-02-10 00:47:38 +00:00
vo_opengl: move the glFlush() call to the renderer
This commit is contained in:
parent
479eb93d9e
commit
4682b0147e
@ -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++;
|
||||
}
|
||||
|
||||
|
@ -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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user