summaryrefslogtreecommitdiffstats
path: root/video/out/vo_opengl.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-03-20 04:57:51 +0100
committerwm4 <wm4@nowhere>2017-03-20 04:57:51 +0100
commit7e4a73c8e4ed771b914f49a2de14b830469a470a (patch)
tree204364cf03d8d02ffe85cba1673c5e033006419c /video/out/vo_opengl.c
parentf8861f681f5b18ebb9c32cb6e4909766f92b9263 (diff)
downloadmpv-7e4a73c8e4ed771b914f49a2de14b830469a470a.tar.bz2
mpv-7e4a73c8e4ed771b914f49a2de14b830469a470a.tar.xz
vo_opengl: add a --opengl-es=force2 option
Useful for testing. Unfortunately, the nVidia EGL driver ignores this, and returns a GLES 3.2 context anyway (which it is allowed to do). Might still be useable with ANGLE, which will really give you a GLES 2 context if you ask for it.
Diffstat (limited to 'video/out/vo_opengl.c')
-rw-r--r--video/out/vo_opengl.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/video/out/vo_opengl.c b/video/out/vo_opengl.c
index 419631a0df..a1b9f6a75b 100644
--- a/video/out/vo_opengl.c
+++ b/video/out/vo_opengl.c
@@ -373,6 +373,8 @@ static int preinit(struct vo *vo)
if (p->opts.es == 1)
vo_flags |= VOFLAG_GLES;
+ if (p->opts.es == 2)
+ vo_flags |= VOFLAG_GLES | VOFLAG_GLES2;
if (p->opts.es == -1)
vo_flags |= VOFLAG_NO_GLES;
@@ -437,7 +439,8 @@ const struct vo_driver video_out_opengl = {
OPT_STRING_VALIDATE("opengl-backend", opts.backend, 0,
mpgl_validate_backend_opt),
OPT_FLAG("opengl-sw", opts.allow_sw, 0),
- OPT_CHOICE("opengl-es", opts.es, 0, ({"no", -1}, {"auto", 0}, {"yes", 1})),
+ OPT_CHOICE("opengl-es", opts.es, 0, ({"no", -1}, {"auto", 0},
+ {"yes", 1}, {"force2", 2})),
OPT_INTPAIR("opengl-check-pattern", opts.pattern, 0),
OPT_INTRANGE("opengl-vsync-fences", opts.vsync_fences, 0,
0, NUM_VSYNC_FENCES),