From bd70c325047ee58907e32f1f2ce66b34291773f3 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 26 Oct 2013 14:13:55 +0200 Subject: 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. --- video/out/gl_common.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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"); -- cgit v1.2.3