mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-10 14:42:13 +00:00
fix outline quirks.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5505 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
15faa72a3d
commit
07ac8fd047
1 changed files with 10 additions and 6 deletions
|
@ -6341,24 +6341,28 @@ void GLBE_DrawWorld (batch_t **worldbatches)
|
|||
#endif
|
||||
}
|
||||
|
||||
#ifndef GLSLONLY
|
||||
if (r_outline.ival && !r_wireframe.ival && qglPolygonMode && qglLineWidth)
|
||||
{
|
||||
int oc = r_refdef.flipcull;
|
||||
shaderstate.identitylighting = 0;
|
||||
shaderstate.identitylightmap = 0;
|
||||
r_refdef.flipcull = SHADER_CULL_FLIP;
|
||||
BE_SelectMode(BEM_DEPTHDARK);
|
||||
shaderstate.polyoffset.unit = -25;
|
||||
shaderstate.polyoffset.factor = -0.05;
|
||||
r_refdef.flipcull ^= SHADER_CULL_FLIP;
|
||||
GLBE_SelectMode(BEM_DEPTHDARK);
|
||||
shaderstate.polyoffset.unit = 1;
|
||||
shaderstate.polyoffset.factor = 1;
|
||||
|
||||
qglEnable(GL_POLYGON_OFFSET_LINE);
|
||||
qglLineWidth (bound(0.1, r_outline_width.value, 3.0));
|
||||
qglPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
|
||||
GLBE_SubmitMeshes(NULL, SHADER_SORT_PORTAL, SHADER_SORT_SEETHROUGH+1);
|
||||
BE_SelectMode(BEM_STANDARD);
|
||||
GLBE_SubmitMeshes(NULL, SHADER_SORT_PORTAL, SHADER_SORT_OPAQUE+1);
|
||||
r_refdef.flipcull = oc;
|
||||
GLBE_SelectMode(BEM_STANDARD);
|
||||
qglDisable(GL_POLYGON_OFFSET_LINE);
|
||||
qglPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
|
||||
qglLineWidth (1);
|
||||
}
|
||||
#endif
|
||||
|
||||
shaderstate.identitylighting = 1;
|
||||
|
||||
|
|
Loading…
Reference in a new issue