summaryrefslogtreecommitdiffstats
path: root/video/out/vo_opengl.c
diff options
context:
space:
mode:
Diffstat (limited to 'video/out/vo_opengl.c')
-rw-r--r--video/out/vo_opengl.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/video/out/vo_opengl.c b/video/out/vo_opengl.c
index 23a22a3f7e..ef6fe53e43 100644
--- a/video/out/vo_opengl.c
+++ b/video/out/vo_opengl.c
@@ -102,7 +102,8 @@ static void resize(struct gl_priv *p)
struct mp_osd_res osd;
vo_get_src_dst_rects(vo, &src, &dst, &osd);
- gl_video_resize(p->renderer, vo->dwidth, -vo->dheight, &src, &dst, &osd);
+ int height = p->glctx->flip_v ? vo->dheight : -vo->dheight;
+ gl_video_resize(p->renderer, vo->dwidth, height, &src, &dst, &osd);
vo->want_redraw = true;
}
@@ -205,7 +206,7 @@ static void request_hwdec_api(struct gl_priv *p, const char *api_name)
if (p->hwdec)
return;
- p->hwdec = gl_hwdec_load_api(p->vo->log, p->gl, api_name);
+ p->hwdec = gl_hwdec_load_api(p->vo->log, p->gl, p->vo->global, api_name);
gl_video_set_hwdec(p->renderer, p->hwdec);
if (p->hwdec)
p->hwdec_info.hwctx = p->hwdec->hwctx;
@@ -397,8 +398,10 @@ static int preinit(struct vo *vo)
if (p->use_gl_debug)
vo_flags |= VOFLAG_GL_DEBUG;
- if (p->es)
+ if (p->es == 1)
vo_flags |= VOFLAG_GLES;
+ if (p->es == -1)
+ vo_flags |= VOFLAG_NO_GLES;
if (p->allow_sw)
vo_flags |= VOFLAG_SW;
@@ -439,7 +442,7 @@ static int preinit(struct vo *vo)
if (hwdec == HWDEC_NONE)
hwdec = vo->global->opts->hwdec_api;
if (hwdec != HWDEC_NONE) {
- p->hwdec = gl_hwdec_load_api_id(p->vo->log, p->gl, hwdec);
+ p->hwdec = gl_hwdec_load_api_id(p->vo->log, p->gl, vo->global, hwdec);
gl_video_set_hwdec(p->renderer, p->hwdec);
if (p->hwdec)
p->hwdec_info.hwctx = p->hwdec->hwctx;
@@ -462,7 +465,7 @@ static const struct m_option options[] = {
OPT_FLAG("debug", use_gl_debug, 0),
OPT_STRING_VALIDATE("backend", backend, 0, mpgl_validate_backend_opt),
OPT_FLAG("sw", allow_sw, 0),
- OPT_FLAG("es", es, 0),
+ OPT_CHOICE("es", es, 0, ({"no", -1}, {"auto", 0}, {"yes", 1})),
OPT_INTPAIR("check-pattern", opt_pattern, 0),
OPT_INTRANGE("vsync-fences", opt_vsync_fences, 0, 0, NUM_VSYNC_FENCES),
@@ -502,6 +505,7 @@ const struct vo_driver video_out_opengl_hq = {
.priv_size = sizeof(struct gl_priv),
.priv_defaults = &(const struct gl_priv){
.renderer_opts = (struct gl_video_opts *)&gl_video_opts_hq_def,
+ .es = -1,
},
.options = options,
};