From 8f1168b73f963c61dcaa5cadf815d0cf3f3ecdad Mon Sep 17 00:00:00 2001 From: Alexander Preisinger Date: Tue, 2 Apr 2013 21:01:07 +0200 Subject: [PATCH] wayland: use vo flags for enabling alpha support I missed the VOFLAG for enabling alpha support --- video/out/gl_wayland.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/video/out/gl_wayland.c b/video/out/gl_wayland.c index 1659e1bc15..d04b17286b 100644 --- a/video/out/gl_wayland.c +++ b/video/out/gl_wayland.c @@ -86,7 +86,8 @@ static void egl_resize_func(struct vo_wayland_state *wl, static bool egl_create_context(struct vo_wayland_state *wl, struct egl_context *egl_ctx, - MPGLContext *ctx) + MPGLContext *ctx, + bool enable_alpha) { EGLint major, minor, n; @@ -101,7 +102,7 @@ static bool egl_create_context(struct vo_wayland_state *wl, EGL_RED_SIZE, 1, EGL_GREEN_SIZE, 1, EGL_BLUE_SIZE, 1, - EGL_ALPHA_SIZE, 1, + EGL_ALPHA_SIZE, enable_alpha, EGL_DEPTH_SIZE, 1, EGL_RENDERABLE_TYPE, EGL_OPENGL_BIT, EGL_NONE @@ -174,6 +175,7 @@ static bool config_window_wayland(struct MPGLContext *ctx, { struct egl_context * egl_ctx = ctx->priv; struct vo_wayland_state * wl = ctx->vo->wayland; + bool enable_alpha = !!(flags & VOFLAG_ALPHA); bool ret = false; wl->window->pending_width = d_width; @@ -188,7 +190,7 @@ static bool config_window_wayland(struct MPGLContext *ctx, if (!egl_ctx->egl.ctx) { /* Create OpenGL context */ - ret = egl_create_context(wl, egl_ctx, ctx); + ret = egl_create_context(wl, egl_ctx, ctx, enable_alpha); /* If successfully created the context and we don't want to hide the * window than also create the window immediately */