From 6753cddce13b22c50210394c607fe5d2482bba11 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 8 May 2016 09:22:38 +0200 Subject: [PATCH] - fixed: The HUD weapon drawer partially took the render state from the previous things that got rendered. Especially the blend mode could be randomly set to different values. --- src/gl/scene/gl_weapon.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gl/scene/gl_weapon.cpp b/src/gl/scene/gl_weapon.cpp index 171692497..f1cd5e38b 100644 --- a/src/gl/scene/gl_weapon.cpp +++ b/src/gl/scene/gl_weapon.cpp @@ -353,6 +353,9 @@ void FGLRenderer::DrawPlayerSprites(sector_t * viewsector, bool hudModelStep) // now draw the different layers of the weapon gl_RenderState.EnableBrightmap(true); gl_RenderState.SetObjectColor(ThingColor); + gl_RenderState.BlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + gl_RenderState.AlphaFunc(GL_GEQUAL, gl_mask_sprite_threshold); + gl_RenderState.BlendEquation(GL_FUNC_ADD); if (statebright[0] || statebright[1]) { // brighten the weapon to reduce the difference between