- 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.

This commit is contained in:
Christoph Oelckers 2016-05-08 09:22:38 +02:00
parent f4e4221da7
commit 6753cddce1
1 changed files with 3 additions and 0 deletions

View File

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