mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-14 08:31:23 +00:00
- 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:
parent
111205a0f5
commit
5302a10a7d
1 changed files with 6 additions and 0 deletions
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue