enable gl blending

This makes transparency work correctly.

fixes #56
This commit is contained in:
Tony Crisci 2017-08-10 08:36:33 -04:00
parent 14654ecb77
commit 49e97857c7
1 changed files with 5 additions and 0 deletions

View File

@ -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
}