From fea1ce4aaacdf7a756c1e45e6aab3b93c7bbe94c Mon Sep 17 00:00:00 2001 From: Booklordofthedings <59422062+Booklordofthedings@users.noreply.github.com> Date: Mon, 9 Nov 2020 18:04:59 +0100 Subject: [PATCH] Display alpha value properly The alpha of textures currently only displays as black and not as see through. This fixes that issue. --- src/PlatformLayer/SDL2/SDL2PlatformLayer.bf | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/PlatformLayer/SDL2/SDL2PlatformLayer.bf b/src/PlatformLayer/SDL2/SDL2PlatformLayer.bf index 12e1c52..94d3f63 100644 --- a/src/PlatformLayer/SDL2/SDL2PlatformLayer.bf +++ b/src/PlatformLayer/SDL2/SDL2PlatformLayer.bf @@ -58,6 +58,10 @@ namespace Strawberry.SDL2 SDL.GL_SetSwapInterval(1); GL.Init(=> SdlGetProcAddress); + //We need to activate this somehwere to make use of the alpha layer + GL.glEnable(GL.GL_BLEND); + GL.glBlendFunc(GL.GL_SRC_ALPHA, GL.GL_ONE_MINUS_SRC_ALPHA); + shader = new Shader(String[2] ( // vertex shader """