From 49e97857c7f3bc4b8563ce5118a9384024f0fc56 Mon Sep 17 00:00:00 2001 From: Tony Crisci Date: Thu, 10 Aug 2017 08:36:33 -0400 Subject: enable gl blending This makes transparency work correctly. fixes #56 --- render/gles2/renderer.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'render/gles2') diff --git a/render/gles2/renderer.c b/render/gles2/renderer.c index 7d0db8b3..703edd46 100644 --- a/render/gles2/renderer.c +++ b/render/gles2/renderer.c @@ -83,6 +83,11 @@ static void wlr_gles2_begin(struct wlr_renderer_state *state, int32_t width = output->width; int32_t height = output->height; GL_CALL(glViewport(0, 0, width, height)); + + // enable transparency + GL_CALL(glEnable(GL_BLEND)); + GL_CALL(glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA)); + // Note: maybe we should save output projection and remove some of the need // for users to sling matricies themselves } -- cgit v1.2.3