diff options
author | wm4 <wm4@nowhere> | 2014-12-15 04:40:26 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-12-15 04:40:26 +0100 |
commit | 1c2cbeabc270874c8f14e16c8f7a09c1f0a382d9 (patch) | |
tree | 15ea7c8cfb1d538ad8b43e8f5879edcbdf656a55 /video/out/gl_video.c | |
parent | 39e04e929483847a3e0722d86d53f69837ed99db (diff) | |
download | mpv-1c2cbeabc270874c8f14e16c8f7a09c1f0a382d9.tar.bz2 mpv-1c2cbeabc270874c8f14e16c8f7a09c1f0a382d9.tar.xz |
vo_opengl: remove quadbuffer/anaglyph stereo 3D rendering
Obscure feature, and I've never heard of anyone using it.
The anaglyph effects can be reproduced with vf_stereo3d. The only thing
that can't be reproduced with it is "quadbuffer", which requires special
and expensive hardware.
Diffstat (limited to 'video/out/gl_video.c')
-rw-r--r-- | video/out/gl_video.c | 42 |
1 files changed, 5 insertions, 37 deletions
diff --git a/video/out/gl_video.c b/video/out/gl_video.c index 2b99200f4f..89572c9011 100644 --- a/video/out/gl_video.c +++ b/video/out/gl_video.c @@ -315,11 +315,6 @@ const struct m_sub_options gl_video_conf = { OPT_FLAG("approx-gamma", approx_gamma, 0), OPT_FLAG("npot", npot, 0), OPT_FLAG("pbo", pbo, 0), - OPT_CHOICE("stereo", stereo_mode, 0, - ({"no", 0}, - {"red-cyan", GL_3D_RED_CYAN}, - {"green-magenta", GL_3D_GREEN_MAGENTA}, - {"quadbuffer", GL_3D_QUADBUFFER})), OPT_STRING_VALIDATE("lscale", scalers[0], 0, validate_scaler_opt), OPT_STRING_VALIDATE("cscale", scalers[1], 0, validate_scaler_opt), OPT_STRING_VALIDATE("lscale-down", dscalers[0], 0, validate_scaler_opt), @@ -1574,7 +1569,6 @@ struct pass { bool use_dst; struct mp_rect dst; int flags; // for write_quad - bool render_stereo; }; // *chain contains the source, and is overwritten with a copy of the result @@ -1613,36 +1607,11 @@ static void handle_pass(struct gl_video *p, struct pass *chain, fbo->vp_x, fbo->vp_y, fbo->vp_w, fbo->vp_h, fbo->tex_w, fbo->tex_h, chain->flags); - if (chain->render_stereo && p->opts.stereo_mode) { - int w = src.x1 - src.x0; - int imgw = p->image_w; - - glEnable3DLeft(gl, p->opts.stereo_mode); - - write_quad(vb, - dst.x0, dst.y0, dst.x1, dst.y1, - src.x0 / 2, src.y0, - src.x0 / 2 + w / 2, src.y1, - tex_w, tex_h, NULL, p->gl_target, chain->flags); - draw_triangles(p, vb, VERTICES_PER_QUAD); - - glEnable3DRight(gl, p->opts.stereo_mode); - - write_quad(vb, - dst.x0, dst.y0, dst.x1, dst.y1, - src.x0 / 2 + imgw / 2, src.y0, - src.x0 / 2 + imgw / 2 + w / 2, src.y1, - tex_w, tex_h, NULL, p->gl_target, chain->flags); - draw_triangles(p, vb, VERTICES_PER_QUAD); - - glDisable3D(gl, p->opts.stereo_mode); - } else { - write_quad(vb, - dst.x0, dst.y0, dst.x1, dst.y1, - src.x0, src.y0, src.x1, src.y1, - tex_w, tex_h, NULL, p->gl_target, chain->flags); - draw_triangles(p, vb, VERTICES_PER_QUAD); - } + write_quad(vb, + dst.x0, dst.y0, dst.x1, dst.y1, + src.x0, src.y0, src.x1, src.y1, + tex_w, tex_h, NULL, p->gl_target, chain->flags); + draw_triangles(p, vb, VERTICES_PER_QUAD); *chain = (struct pass){ .num = chain->num + 1, @@ -1719,7 +1688,6 @@ void gl_video_render_frame(struct gl_video *p, int fbo) chain.dst = p->dst_rect; chain.flags = (p->image_params.rotate % 90 ? 0 : p->image_params.rotate / 90) | (vimg->image_flipped ? 4 : 0); - chain.render_stereo = true; handle_pass(p, &chain, &screen, p->final_program); |