From 519fa4cd8166c14287cb0c7480fd6e9e96227962 Mon Sep 17 00:00:00 2001 From: plagman Date: Mon, 18 Feb 2008 07:55:08 +0000 Subject: [PATCH] Corrects fog disabling when drawing fullbright shit. Fixes sky #93. git-svn-id: https://svn.eduke32.com/eduke32@621 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/build/src/polymost.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/polymer/build/src/polymost.c b/polymer/build/src/polymost.c index b2cae81aa..d6e94d138 100644 --- a/polymer/build/src/polymost.c +++ b/polymer/build/src/polymost.c @@ -169,7 +169,7 @@ int r_vbocount = 64; // model animation smoothing cvar int r_animsmoothing = 1; -static float fogresult, ofogresult, fogcol[4]; +static float fogresult, fogcol[4]; // making this a macro should speed things up at the expense of code size #define fogcalc(shade, vis, pal) \ @@ -2159,13 +2159,11 @@ void drawpoly(double *dpx, double *dpy, int n, int method) { fullbrightdrawingpass = 2; shadeforfullbrightpass = globalshade; // save the current shade - bglFogf(GL_FOG_DENSITY,0.0f); // no fog globalshade = -128; // fullbright - ofogresult = fogresult; + bglDisable(GL_FOG); drawpoly(dpx, dpy, n_, method_); // draw them afterwards, then. :) - fogresult = ofogresult; + bglEnable(GL_FOG); globalshade = shadeforfullbrightpass; - bglFogf(GL_FOG_DENSITY, fogresult); fullbrightdrawingpass = 0; } return;