]> git.lizzy.rs Git - dragonblocks_alpha.git/commitdiff
Enable blending and fix HUD screen scaling
authorElias Fleckenstein <eliasfleckenstein@web.de>
Mon, 12 Jul 2021 16:04:05 +0000 (18:04 +0200)
committerElias Fleckenstein <eliasfleckenstein@web.de>
Mon, 12 Jul 2021 16:04:05 +0000 (18:04 +0200)
src/client.c
src/hud.c

index 02e6855edd130137bd665312edb8f1d2abdc6eab..2f465ac37ec025f44cbcc7a8f71ca03c7d35de7e 100644 (file)
@@ -117,6 +117,8 @@ static void client_loop()
                ts_old = ts;
 
                glEnable(GL_DEPTH_TEST);
+               glEnable(GL_BLEND);
+               glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
                glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
                glClearColor(0.52941176470588f, 0.8078431372549f, 0.92156862745098f, 1.0f);
 
index 30034086e7f544f9654f2a957a7fc85039bd84f4..cdf856a6bf6454b4259b6f503ff5985843276aa2 100644 (file)
--- a/src/hud.c
+++ b/src/hud.c
@@ -60,8 +60,8 @@ static void element_transform(HUDElement *element)
                        break;
 
                case HUD_SCALE_SCREEN:
-                       scale.x *= hud.width;
-                       scale.y *= hud.height;
+                       scale.x *= hud.width * 2.0f;
+                       scale.y *= hud.height * 2.0f;
 
                        break;