summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-10-26 14:13:55 +0200
committerwm4 <wm4@nowhere>2013-10-26 14:17:53 +0200
commit74e7043cc756e171ea1a7fd4be01019c14e1e265 (patch)
tree4698936e43d86453ed8eb9d006db5a71d0458b60 /video
parent6ac5474790a481feee1c9eba8d1576f38ecb75f7 (diff)
downloadmpv-74e7043cc756e171ea1a7fd4be01019c14e1e265.tar.bz2
mpv-74e7043cc756e171ea1a7fd4be01019c14e1e265.tar.xz
gl_common: suggest --vo=opengl-old if OpenGL 2.1 missing
If the caller requests at least OpenGL 2.1 (which --vo=opengl does), but we get OpenGL 1.x, suggest using opengl-old. Based on a patch by pfor on IRC.
Diffstat (limited to 'video')
-rw-r--r--video/out/gl_common.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/video/out/gl_common.c b/video/out/gl_common.c
index 3830f237f8..10e806dc8d 100644
--- a/video/out/gl_common.c
+++ b/video/out/gl_common.c
@@ -944,8 +944,13 @@ bool mpgl_config_window(struct MPGLContext *ctx, int gl_caps, uint32_t d_width,
MP_WARN(ctx->vo, "Missing OpenGL features:");
list_features(missing, ctx->vo->log, MSGL_WARN, false);
- if (missing & MPGL_CAP_NO_SW)
+ if (missing & MPGL_CAP_NO_SW) {
MP_WARN(ctx->vo, "Rejecting suspected software OpenGL renderer.\n");
+ } else if ((missing & MPGL_CAP_GL21) &&
+ (ctx->gl->mpgl_caps & MPGL_CAP_GL_LEGACY))
+ {
+ MP_WARN(ctx->vo, "OpenGL version too old. Try: --vo=opengl-old\n");
+ }
}
MP_ERR(ctx->vo, "OpenGL context creation failed!\n");