summaryrefslogtreecommitdiffstats
path: root/video/out/gl_x11.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-01-21 20:32:42 +0100
committerwm4 <wm4@nowhere>2015-01-21 20:32:42 +0100
commite34957940b5012dba23616469fb5aec56fcde5ee (patch)
tree460acc027f1cdae8814992ec6f4a6f3a63de37c7 /video/out/gl_x11.c
parentc15697477fca133b69cad58ad2d43b94b994f6fd (diff)
downloadmpv-e34957940b5012dba23616469fb5aec56fcde5ee.tar.bz2
mpv-e34957940b5012dba23616469fb5aec56fcde5ee.tar.xz
vo_opengl: cleanups after vo_opengl_old removal
Don't load all the legacy functions (including ancient extensions). Slightly simplify function loader and context creation, now that legacy GL doesn't need to be handled. Remove the code for drawing OSD in legacy mode. Remove all the header hacks, which were meant for ancient OpenGL headers which didn't even support things like OpenGL 1.3. Instead, adjust the GLX check to make sure we get both OpenGL 3x and 2.1 symbols. For win32 and OSX, we assume that the user has the latest headers anyway. For wayland, we hope that things somehow go right.
Diffstat (limited to 'video/out/gl_x11.c')
-rw-r--r--video/out/gl_x11.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/video/out/gl_x11.c b/video/out/gl_x11.c
index b99f5ccc0a..fa1ab62a28 100644
--- a/video/out/gl_x11.c
+++ b/video/out/gl_x11.c
@@ -261,11 +261,12 @@ static bool config_window_x11(struct MPGLContext *ctx, int flags)
int gl_version = ctx->requested_gl_version;
bool success = false;
- if (gl_version >= 300 && !glx_ctx->force_es)
+ if (!glx_ctx->force_es) {
success = create_context_x11_gl3(ctx, flags, gl_version, false);
- if (!success && !glx_ctx->force_es)
- success = create_context_x11_old(ctx);
- if (!success && gl_version >= 300) // 3.00 = vo_opengl; accepts GLES 2 or 3
+ if (!success)
+ success = create_context_x11_old(ctx);
+ }
+ if (!success) // try ES
success = create_context_x11_gl3(ctx, flags, 200, true);
if (success && !glXIsDirect(vo->x11->display, glx_ctx->context))
ctx->gl->mpgl_caps |= MPGL_CAP_SW;