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
This commit is contained in:
pogokeen 2018-02-16 06:38:07 +00:00
parent 28f9fcebb4
commit 037289a812

View file

@ -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; (pth && pth->hicr && pth->hicr->alphacut >= 0.f ? pth->hicr->alphacut : 0.f) : 0.f;
bglAlphaFunc(GL_GREATER, al); bglAlphaFunc(GL_GREATER, al);
handle_blend((method & DAMETH_MASKPROPS) > DAMETH_MASK, drawpoly_blend, (method & DAMETH_MASKPROPS) == DAMETH_TRANS2);
bglEnable(GL_BLEND); bglEnable(GL_BLEND);
bglEnable(GL_ALPHA_TEST); 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 // spriteext full alpha control
pc[3] = float_trans(method & DAMETH_MASKPROPS, drawpoly_blend) * (1.f - drawpoly_alpha); 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) if (pth)
{ {
// tinting // tinting