mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-29 07:22:07 +00:00
- use glPOlygonOffset on non-translucent flat and wall sprites to avoid z-fighting.
This commit is contained in:
parent
0a98fb0be7
commit
52d4c3970e
1 changed files with 10 additions and 0 deletions
|
@ -310,6 +310,11 @@ void GLSprite::Draw(int pass)
|
|||
additivefog = true;
|
||||
}
|
||||
}
|
||||
else if (modelframe == nullptr)
|
||||
{
|
||||
glEnable(GL_POLYGON_OFFSET_FILL);
|
||||
glPolygonOffset(-1.0f, -128.0f);
|
||||
}
|
||||
if (RenderStyle.BlendOp!=STYLEOP_Shadow)
|
||||
{
|
||||
if (gl_lights && GLRenderer->mLightCount && !gl_fixedcolormap && !fullbright)
|
||||
|
@ -440,6 +445,11 @@ void GLSprite::Draw(int pass)
|
|||
gl_RenderState.BlendEquation(GL_FUNC_ADD);
|
||||
gl_RenderState.SetTextureMode(TM_MODULATE);
|
||||
}
|
||||
else if (modelframe == nullptr)
|
||||
{
|
||||
glPolygonOffset(0.0f, 0.0f);
|
||||
glDisable(GL_POLYGON_OFFSET_FILL);
|
||||
}
|
||||
|
||||
gl_RenderState.SetObjectColor(0xffffffff);
|
||||
gl_RenderState.EnableTexture(true);
|
||||
|
|
Loading…
Reference in a new issue