diff options
author | wm4 <wm4@nowhere> | 2014-12-02 20:11:20 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-12-02 20:36:55 +0100 |
commit | ef1c7563c530bebf01493d494b960da4a06fa242 (patch) | |
tree | 47fbe4cc06912205d679ddbd6e483ff7b7769aae /video/out/vo_opengl.c | |
parent | 33a6b8df46f514a450d34dd74e20f4124426fe13 (diff) | |
download | mpv-ef1c7563c530bebf01493d494b960da4a06fa242.tar.bz2 mpv-ef1c7563c530bebf01493d494b960da4a06fa242.tar.xz |
vo_opengl: minor changes
Always set the viewport on entry. The way the viewport is tracked is a
bit complicated in my opinion, and in fact it doesn't even reduce the
number of GL calls. Setting it on entry is actually redundant if video
covers the screen fully, because the handle_pass() unconditionally sets
it anyway, but avoiding it would complicate the cases gl->Clear() is
actually needed.
Add a fbo argument to gl_video_render_frame(). This allows you to render
into a FBO rather than the default framebuffer. It will be useful for
providing an API to render on an external GL context. (If that will
actually be added.)
Diffstat (limited to 'video/out/vo_opengl.c')
-rw-r--r-- | video/out/vo_opengl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/video/out/vo_opengl.c b/video/out/vo_opengl.c index c7d274ec72..d3fdf88372 100644 --- a/video/out/vo_opengl.c +++ b/video/out/vo_opengl.c @@ -164,7 +164,7 @@ static void draw_image(struct vo *vo, mp_image_t *mpi) mpgl_lock(p->glctx); gl_video_upload_image(p->renderer, mpi); - gl_video_render_frame(p->renderer); + gl_video_render_frame(p->renderer, 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 @@ -402,7 +402,7 @@ static int control(struct vo *vo, uint32_t request, void *data) return true; case VOCTRL_REDRAW_FRAME: mpgl_lock(p->glctx); - gl_video_render_frame(p->renderer); + gl_video_render_frame(p->renderer, 0); mpgl_unlock(p->glctx); return true; case VOCTRL_SET_COMMAND_LINE: { |