From 40737f44cc712c037babbbdeef64d7fc31b122e5 Mon Sep 17 00:00:00 2001 From: pogokeen Date: Mon, 6 May 2019 21:53:41 +0000 Subject: [PATCH] polymost.cpp: fix polymost_dorotatesprite() alpha test/blend issue introduced in r7619 git-svn-id: https://svn.eduke32.com/eduke32@7625 1a8010ca-5511-0410-912e-c29ae57300e0 --- source/build/src/polymost.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/source/build/src/polymost.cpp b/source/build/src/polymost.cpp index 2360766d0..1f5860ca9 100644 --- a/source/build/src/polymost.cpp +++ b/source/build/src/polymost.cpp @@ -6847,8 +6847,6 @@ void polymost_dorotatesprite(int32_t sx, int32_t sy, int32_t z, int16_t a, int16 glLoadIdentity(); glDisable(GL_DEPTH_TEST); - glEnable(GL_ALPHA_TEST); - glEnable(GL_BLEND); #if defined(POLYMER) # ifdef USE_GLEXT @@ -6861,11 +6859,19 @@ void polymost_dorotatesprite(int32_t sx, int32_t sy, int32_t z, int16_t a, int16 if (!(dastat & RS_NOMASK)) { + glEnable(GL_ALPHA_TEST); + glEnable(GL_BLEND); + if (dastat & RS_TRANS1) method |= (dastat & RS_TRANS2) ? DAMETH_TRANS2 : DAMETH_TRANS1; else method |= DAMETH_MASK; } + else + { + glDisable(GL_ALPHA_TEST); + glDisable(GL_BLEND); + } handle_blend(!!(dastat & RS_TRANS1), dablend, !!(dastat & RS_TRANS2));