summaryrefslogtreecommitdiffstats
path: root/video/out/gl_x11.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-12-19 18:37:16 +0100
committerwm4 <wm4@nowhere>2014-12-19 18:54:39 +0100
commit88982f2855590cafb1fdce916384751ae728ba0c (patch)
treefbc954496ac649aef5f253f33002010f9a30086f /video/out/gl_x11.c
parentbebc323c6d6aab298f920cd462e7c0fe375925db (diff)
downloadmpv-88982f2855590cafb1fdce916384751ae728ba0c.tar.bz2
mpv-88982f2855590cafb1fdce916384751ae728ba0c.tar.xz
vo_opengl: better probe handling
Involve detection of software renderers in the probing properly. Other VOs could handle probing also more gracefully, and e.g. produce less noise if an API is unavailable. (Although other than the OpenGL VOs, only vo_wayland will.) Now the "sw" suboption for vo_opengl[_old] is strictly speaking not needed anymore. Doing "--vo=opengl" disables the probing logic, and will always force it, if possible. Includes some simplifications as well.
Diffstat (limited to 'video/out/gl_x11.c')
-rw-r--r--video/out/gl_x11.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/video/out/gl_x11.c b/video/out/gl_x11.c
index 5fe43e54f7..67f87716bd 100644
--- a/video/out/gl_x11.c
+++ b/video/out/gl_x11.c
@@ -68,9 +68,6 @@ static bool create_context_x11_old(struct MPGLContext *ctx)
glx_ctx->context = new_context;
- if (!glXIsDirect(vo->x11->display, new_context))
- ctx->gl->mpgl_caps &= ~MPGL_CAP_NO_SW;
-
return true;
}
@@ -124,9 +121,6 @@ static bool create_context_x11_gl3(struct MPGLContext *ctx, bool debug)
mpgl_load_functions(ctx->gl, (void *)glXGetProcAddress, glxstr, vo->log);
- if (!glXIsDirect(vo->x11->display, context))
- ctx->gl->mpgl_caps &= ~MPGL_CAP_NO_SW;
-
return true;
}
@@ -260,14 +254,11 @@ static bool config_window_x11(struct MPGLContext *ctx, int flags)
success = create_context_x11_gl3(ctx, flags & VOFLAG_GL_DEBUG);
if (!success)
success = create_context_x11_old(ctx);
+ if (success && !glXIsDirect(vo->x11->display, glx_ctx->context))
+ ctx->gl->mpgl_caps |= MPGL_CAP_SW;
return success;
}
-
-/**
- * \brief free the VisualInfo and GLXContext of an OpenGL context.
- * \ingroup glcontext
- */
static void releaseGlContext_x11(MPGLContext *ctx)
{
struct glx_context *glx_ctx = ctx->priv;