From 1c9d0b419946b61308e206e5c0e675567ab04f35 Mon Sep 17 00:00:00 2001 From: XProger Date: Wed, 6 Sep 2017 03:04:57 +0300 Subject: [PATCH] #15 fix alpha composing for WebGL --- src/core.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/core.h b/src/core.h index e113ae0..77606cf 100644 --- a/src/core.h +++ b/src/core.h @@ -125,8 +125,8 @@ #endif #elif __EMSCRIPTEN__ #define MOBILE - #include - #include + #include + #include #include #include @@ -856,6 +856,12 @@ namespace Core { void endFrame() { Core::stats.stop(); + #ifdef __EMSCRIPTEN__ + glColorMask(false, false, false, true); + glClearColor(0.0f, 0.0f, 0.0f, 1.0f); + glClear(GL_COLOR_BUFFER_BIT); + glColorMask(true, true, true, true); + #endif } void DIP(int iStart, int iCount) {