mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-16 17:41:19 +00:00
- Fill the gaps with the sky or ceiling texture.
This commit is contained in:
parent
47c51f437e
commit
2b27cb0bba
3 changed files with 30 additions and 4 deletions
|
@ -77,7 +77,7 @@ void GLSceneDrawer::UnclipSubsector(subsector_t *sub)
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
CVAR(Float, gl_line_distance_cull, 0.0, 0 /*CVAR_ARCHIVE|CVAR_GLOBALCONFIG*/) // this is deactivated, for now
|
||||
CVAR(Float, gl_line_distance_cull, 0.0, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
||||
|
||||
inline bool IsDistanceCulled(seg_t *line)
|
||||
{
|
||||
|
@ -138,7 +138,14 @@ void GLSceneDrawer::AddLine (seg_t *seg, bool portalclip)
|
|||
|
||||
uint8_t ispoly = uint8_t(seg->sidedef->Flags & WALLF_POLYOBJ);
|
||||
|
||||
if (IsDistanceCulled(seg)) { clipper.SafeAddClipRange(startAngle, endAngle); return; }
|
||||
if (IsDistanceCulled(seg))
|
||||
{
|
||||
GLWall wall(this);
|
||||
wall.sub = currentsubsector;
|
||||
wall.Process(seg, seg->frontsector, seg->backsector, true);
|
||||
clipper.SafeAddClipRange(startAngle, endAngle);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!seg->backsector)
|
||||
{
|
||||
|
|
|
@ -271,7 +271,7 @@ public:
|
|||
mDrawer = drawer;
|
||||
}
|
||||
|
||||
void Process(seg_t *seg, sector_t *frontsector, sector_t *backsector);
|
||||
void Process(seg_t *seg, sector_t *frontsector, sector_t *backsector, bool isculled = false);
|
||||
void ProcessLowerMiniseg(seg_t *seg, sector_t *frontsector, sector_t *backsector);
|
||||
void Draw(int pass);
|
||||
|
||||
|
|
|
@ -1425,7 +1425,7 @@ void GLWall::DoFFloorBlocks(seg_t * seg, sector_t * frontsector, sector_t * back
|
|||
//
|
||||
//
|
||||
//==========================================================================
|
||||
void GLWall::Process(seg_t *seg, sector_t * frontsector, sector_t * backsector)
|
||||
void GLWall::Process(seg_t *seg, sector_t * frontsector, sector_t * backsector, bool isculled)
|
||||
{
|
||||
vertex_t * v1, *v2;
|
||||
float fch1;
|
||||
|
@ -1556,6 +1556,25 @@ void GLWall::Process(seg_t *seg, sector_t * frontsector, sector_t * backsector)
|
|||
return;
|
||||
}
|
||||
|
||||
if (isculled)
|
||||
{
|
||||
if (frontsector->GetTexture(sector_t::ceiling) == skyflatnum)
|
||||
{
|
||||
SkyNormal(frontsector, v1, v2);
|
||||
}
|
||||
else
|
||||
{
|
||||
gltexture = FMaterial::ValidateTexture(frontsector->GetTexture(sector_t::ceiling), false, true);
|
||||
if (gltexture)
|
||||
{
|
||||
DoTexture(RENDERWALL_TOP, seg, true,
|
||||
crefz, frefz,
|
||||
fch1, fch2, ffh1, ffh2, 0);
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
//return;
|
||||
// [GZ] 3D middle textures are necessarily two-sided, even if they lack the explicit two-sided flag
|
||||
if (!backsector || !(seg->linedef->flags&(ML_TWOSIDED | ML_3DMIDTEX))) // one sided
|
||||
|
|
Loading…
Reference in a new issue