summaryrefslogtreecommitdiffstats
path: root/video/out/gl_video.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-12-22 12:49:20 +0100
committerwm4 <wm4@nowhere>2014-12-22 12:49:20 +0100
commit2b9a7c4b5bc5697241cb8e1448b2056d20b50b77 (patch)
tree32bd4391ef66c54d73f79df1f1461f390b39a7b3 /video/out/gl_video.c
parentcb347a9d05bf826f645c6d42b80db014cfc31827 (diff)
downloadmpv-2b9a7c4b5bc5697241cb8e1448b2056d20b50b77.tar.bz2
mpv-2b9a7c4b5bc5697241cb8e1448b2056d20b50b77.tar.xz
vo_opengl, vo_opengl_cb: check GL version in renderer
vo_opengl actually checks this in the context creation code already, but it still increases robustness in case the requirements are changed later.
Diffstat (limited to 'video/out/gl_video.c')
-rw-r--r--video/out/gl_video.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/video/out/gl_video.c b/video/out/gl_video.c
index 067f8f2b1c..5235f1bd1e 100644
--- a/video/out/gl_video.c
+++ b/video/out/gl_video.c
@@ -2440,6 +2440,11 @@ void gl_video_set_output_depth(struct gl_video *p, int r, int g, int b)
struct gl_video *gl_video_init(GL *gl, struct mp_log *log, struct osd_state *osd)
{
+ if (!(gl->mpgl_caps & MPGL_CAP_GL21)) {
+ mp_err(log, "At least OpenGL 2.1 or OpenGL ES 2.0 required.\n");
+ return NULL;
+ }
+
struct gl_video *p = talloc_ptrtype(NULL, p);
*p = (struct gl_video) {
.gl = gl,