diff --git a/video/out/opengl/context_x11egl.c b/video/out/opengl/context_x11egl.c index f0cfe378f1..e86b99bb36 100644 --- a/video/out/opengl/context_x11egl.c +++ b/video/out/opengl/context_x11egl.c @@ -21,11 +21,6 @@ #include #include -#ifndef EGL_VERSION_1_5 -#define EGL_CONTEXT_OPENGL_PROFILE_MASK 0x30FD -#define EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT 0x00000001 -#endif - #include "common/common.h" #include "video/out/x11_common.h" #include "context.h" @@ -109,7 +104,8 @@ static bool mpegl_init(struct ra_ctx *ctx) if (!vo_x11_init(vo)) goto uninit; - p->egl_display = eglGetDisplay(vo->x11->display); + p->egl_display = eglGetPlatformDisplay(EGL_PLATFORM_X11_KHR, + vo->x11->display, NULL); if (!eglInitialize(p->egl_display, NULL, NULL)) { MP_MSG(ctx, msgl, "Could not initialize EGL.\n"); goto uninit; diff --git a/wscript b/wscript index 24e30b2613..74ece8234a 100644 --- a/wscript +++ b/wscript @@ -646,12 +646,20 @@ video_output_features = [ 'func': check_libs(['GL', 'GL Xdamage'], check_cc(fragment=load_fragment('gl_x11.c'), use=['x11', 'libdl', 'pthreads'])) + } , { + 'name': '--egl15', + 'desc': 'EGL 1.5', + 'groups': [ 'gl' ], + 'func': compose_checks( + check_pkg_config('egl'), + check_statement(['EGL/egl.h'], 'int x[EGL_VERSION_1_5]') + ), } , { 'name': '--egl-x11', 'desc': 'OpenGL X11 EGL Backend', - 'deps': 'x11', + 'deps': 'x11 && egl15', 'groups': [ 'gl' ], - 'func': check_pkg_config('egl'), + 'func': check_true, } , { 'name': '--egl-drm', 'desc': 'OpenGL DRM EGL Backend',