summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Preisinger <alexander.preisinger@gmail.com>2013-04-02 21:01:07 +0200
committerAlexander Preisinger <alexander.preisinger@gmail.com>2013-04-02 21:10:22 +0200
commit8f1168b73f963c61dcaa5cadf815d0cf3f3ecdad (patch)
tree574d1b28c8702ebb487fa326233554686e1ab3a0
parent39116ecf3135691a6202bda47d6f21b0633c5322 (diff)
downloadmpv-8f1168b73f963c61dcaa5cadf815d0cf3f3ecdad.tar.bz2
mpv-8f1168b73f963c61dcaa5cadf815d0cf3f3ecdad.tar.xz
wayland: use vo flags for enabling alpha support
I missed the VOFLAG for enabling alpha support
-rw-r--r--video/out/gl_wayland.c8
1 files 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 */