summaryrefslogtreecommitdiffstats
path: root/video/out
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-02-20 18:53:59 +0100
committerwm4 <wm4@nowhere>2015-02-20 19:54:33 +0100
commitd5addec147aecfdf33c5ec4ad585ae821e9bef15 (patch)
treee4229f07db14b66905a3df594d101d3c1272ea56 /video/out
parent9861abf8ffa4c9e7c4ad9a4f3f667e6f833624a3 (diff)
downloadmpv-d5addec147aecfdf33c5ec4ad585ae821e9bef15.tar.bz2
mpv-d5addec147aecfdf33c5ec4ad585ae821e9bef15.tar.xz
x11egl: minor cleanup
Not like it matters, and is probably still not entirely correct.
Diffstat (limited to 'video/out')
-rw-r--r--video/out/gl_x11egl.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/video/out/gl_x11egl.c b/video/out/gl_x11egl.c
index 2bd4def4df..1f6f328251 100644
--- a/video/out/gl_x11egl.c
+++ b/video/out/gl_x11egl.c
@@ -44,7 +44,7 @@ static EGLConfig select_fb_config_egl(struct MPGLContext *ctx, bool es)
EGL_GREEN_SIZE, 8,
EGL_BLUE_SIZE, 8,
EGL_DEPTH_SIZE, 0,
- EGL_RENDERABLE_TYPE, es ? EGL_OPENGL_ES_BIT : EGL_OPENGL_BIT,
+ EGL_RENDERABLE_TYPE, es ? EGL_OPENGL_ES2_BIT : EGL_OPENGL_BIT,
EGL_NONE
};
@@ -67,7 +67,7 @@ static bool create_context_egl(MPGLContext *ctx, EGLConfig config,
struct priv *p = ctx->priv;
EGLint context_attributes[] = {
- EGL_CONTEXT_MAJOR_VERSION_KHR,
+ EGL_CONTEXT_CLIENT_VERSION, // aka EGL_CONTEXT_MAJOR_VERSION_KHR
es ? 2 : MPGL_VER_GET_MAJOR(ctx->requested_gl_version),
EGL_NONE
};
@@ -103,10 +103,12 @@ static bool config_window_x11_egl_(struct MPGLContext *ctx, int flags, bool es)
return true;
}
- eglBindAPI(es ? EGL_OPENGL_ES_API : EGL_OPENGL_API);
+ if (!eglBindAPI(es ? EGL_OPENGL_ES_API : EGL_OPENGL_API))
+ return false;
p->egl_display = eglGetDisplay(vo->x11->display);
- eglInitialize(p->egl_display, NULL, NULL);
+ if (!eglInitialize(p->egl_display, NULL, NULL))
+ return false;
EGLConfig config = select_fb_config_egl(ctx, es);
if (!config)