diff options
author | wm4 <wm4@nowhere> | 2015-11-15 18:30:54 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-11-15 18:30:54 +0100 |
commit | 883d3114138a8f9a03f778165de553b7cdb99bee (patch) | |
tree | 37baacb20b7d6a64f4209c6c6afa3818f0ebd8ce /video/out/opengl/common.h | |
parent | c7d82dd25c4a059386de562bc26e58bffd71b3fd (diff) | |
download | mpv-883d3114138a8f9a03f778165de553b7cdb99bee.tar.bz2 mpv-883d3114138a8f9a03f778165de553b7cdb99bee.tar.xz |
vo_opengl: use glBlitFramebuffer to draw repeated frames
In the display-sync, non-interpolation case, and if the display refresh
rate is higher than the video framerate, we duplicate display frames by
rendering exactly the same screen again. The redrawing is cached with a
FBO to speed up the repeat.
Use glBlitFramebuffer() instead of another shader pass. It should be
faster.
For some reason, post-process was run again on each display refresh.
Stop doing this, which should also be slightly faster. The only
disadvantage is that temporal dithering will be run only once per video
frame, but I can live with this.
One aspect is messy: clearing the background is done at the start on the
target framebuffer, so to avoid clearing twice and duplicating the code,
only copy the part of the framebuffer that contains the rendered video.
(Which also gets slightly messy - needs to compensate for coordinate
system flipping.)
Diffstat (limited to 'video/out/opengl/common.h')
-rw-r--r-- | video/out/opengl/common.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/video/out/opengl/common.h b/video/out/opengl/common.h index d87be595ba..acae464643 100644 --- a/video/out/opengl/common.h +++ b/video/out/opengl/common.h @@ -234,6 +234,8 @@ struct GL { GLenum (GLAPIENTRY *CheckFramebufferStatus)(GLenum); void (GLAPIENTRY *FramebufferTexture2D)(GLenum, GLenum, GLenum, GLuint, GLint); + void (GLAPIENTRY *BlitFramebuffer)(GLint, GLint, GLint, GLint, GLint, GLint, + GLint, GLint, GLbitfield, GLenum); void (GLAPIENTRY *Uniform1f)(GLint, GLfloat); void (GLAPIENTRY *Uniform2f)(GLint, GLfloat, GLfloat); |