- diable software lighting for textured automap.

* since it is designed for software-style light diminishing it doesn't work for 2D.
* additionally it left the lighting state in an unsuitable setting for further 2D rendering.
This commit is contained in:
Christoph Oelckers 2014-10-23 09:19:30 +02:00
parent 111205a0f5
commit 5302a10a7d

View file

@ -584,8 +584,14 @@ void FGLRenderer::FillSimplePoly(FTexture *texture, FVector2 *points, int npoint
FColormap cm; FColormap cm;
cm = colormap; cm = colormap;
// We cannot use the software light mode here because it doesn't properly calculate the light for 2D rendering.
SBYTE savedlightmode = glset.lightmode;
if (glset.lightmode == 8) glset.lightmode = 0;
gl_SetColor(lightlevel, 0, cm, 1.f); gl_SetColor(lightlevel, 0, cm, 1.f);
glset.lightmode = savedlightmode;
gl_RenderState.SetMaterial(gltexture, CLAMP_NONE, 0, -1, false); gl_RenderState.SetMaterial(gltexture, CLAMP_NONE, 0, -1, false);
int i; int i;