- refactored fog and depth func setting into GLInterface.

This commit is contained in:
Christoph Oelckers 2019-10-04 18:44:16 +02:00
parent 204abab724
commit cb80e877ff
5 changed files with 68 additions and 43 deletions

View file

@ -1081,8 +1081,8 @@ int32_t polymost_voxdraw(voxmodel_t *m, tspriteptr_t const tspr)
if (shadowHack)
{
glDepthFunc(GL_LEQUAL); //NEVER,LESS,(,L)EQUAL,GREATER,(NOT,G)EQUAL,ALWAYS
}
GLInterface.SetDepthFunc(Depth_LessEqual);
}
if ((grhalfxdown10x >= 0) ^ ((globalorientation&8) != 0) ^ ((globalorientation&4) != 0))
@ -1193,9 +1193,8 @@ int32_t polymost_voxdraw(voxmodel_t *m, tspriteptr_t const tspr)
if (shadowHack)
{
glDepthFunc(GL_LESS); //NEVER,LESS,(,L)EQUAL,GREATER,(NOT,G)EQUAL,ALWAYS
// glDepthRange(0.0, 0.99999);
}
GLInterface.SetDepthFunc(Depth_Less);
}
VSMatrix identity(0);
GLInterface.SetMatrix(Matrix_ModelView, &identity);
return 1;