From 037289a81243d7184bfd5007df1bae8d80bfadb0 Mon Sep 17 00:00:00 2001 From: pogokeen Date: Fri, 16 Feb 2018 06:38:07 +0000 Subject: [PATCH] polymost_drawpoly(): only change the blend mode if blending is enabled git-svn-id: https://svn.eduke32.com/eduke32@6655 1a8010ca-5511-0410-912e-c29ae57300e0 --- source/build/src/polymost.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/build/src/polymost.cpp b/source/build/src/polymost.cpp index f2e2b811d..72b21510b 100644 --- a/source/build/src/polymost.cpp +++ b/source/build/src/polymost.cpp @@ -1938,6 +1938,8 @@ static void polymost_drawpoly(vec2f_t const * const dpxy, int32_t const n, int32 (pth && pth->hicr && pth->hicr->alphacut >= 0.f ? pth->hicr->alphacut : 0.f) : 0.f; bglAlphaFunc(GL_GREATER, al); + handle_blend((method & DAMETH_MASKPROPS) > DAMETH_MASK, drawpoly_blend, (method & DAMETH_MASKPROPS) == DAMETH_TRANS2); + bglEnable(GL_BLEND); bglEnable(GL_ALPHA_TEST); } @@ -1959,8 +1961,6 @@ static void polymost_drawpoly(vec2f_t const * const dpxy, int32_t const n, int32 // spriteext full alpha control pc[3] = float_trans(method & DAMETH_MASKPROPS, drawpoly_blend) * (1.f - drawpoly_alpha); - handle_blend((method & DAMETH_MASKPROPS) > DAMETH_MASK, drawpoly_blend, (method & DAMETH_MASKPROPS) == DAMETH_TRANS2); - if (pth) { // tinting