summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-10-26 14:13:55 +0200
committerwm4 <wm4@nowhere>2013-11-02 19:03:28 +0100
commitbd70c325047ee58907e32f1f2ce66b34291773f3 (patch)
treec4cf3b2d1f7ec1f3b2020dbb312ec8076d9f4a15
parent4c88ac3434bd0b5c05510fd394ee11d9dc27f2fa (diff)
downloadmpv-bd70c325047ee58907e32f1f2ce66b34291773f3.tar.bz2
mpv-bd70c325047ee58907e32f1f2ce66b34291773f3.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.
-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");