- fixed: vertically mirrored textures should not be subjected to empty space optimizations because the algorithm cannot deal with the inverted case.

# Conflicts:
#	src/gl/scene/gl_wall.h
This commit is contained in:
Christoph Oelckers 2020-06-04 01:15:44 +02:00 committed by drfrag
parent 30327ffa4f
commit 8ec5a4616b
2 changed files with 6 additions and 3 deletions

View file

@ -120,6 +120,8 @@ public:
GLWF_NOSPLITUPPER=16,
GLWF_NOSPLITLOWER=32,
GLWF_NOSPLIT=64,
GLWF_TRANSLUCENT = 128, // unused
GLWF_NOSLICE = 256
};
enum
@ -155,9 +157,9 @@ public:
float ViewDistance;
TArray<lightlist_t> *lightlist;
int lightlevel;
short lightlevel;
uint16_t flags;
uint8_t type;
uint8_t flags;
short rellight;
float topglowcolor[4];

View file

@ -957,6 +957,7 @@ void GLWall::DoMidTexture(seg_t * seg, bool drawfogboundary,
{
tci.mRenderHeight = -tci.mRenderHeight;
tci.mScale.Y = -tci.mScale.Y;
flags |= GLWF_NOSLICE;
}
SetWallCoordinates(seg, &tci, texturetop, topleft, topright, bottomleft, bottomright, t_ofs);
@ -1017,7 +1018,7 @@ void GLWall::DoMidTexture(seg_t * seg, bool drawfogboundary,
FloatRect *splitrect;
int v = gltexture->GetAreas(&splitrect);
if (seg->frontsector == seg->backsector) flags |= GLWF_NOSPLIT; // we don't need to do vertex splits if a line has both sides in the same sector
if (v>0 && !drawfogboundary && !(seg->linedef->flags&ML_WRAP_MIDTEX))
if (v>0 && !drawfogboundary && !(seg->linedef->flags & ML_WRAP_MIDTEX) && !(flags & GLWF_NOSLICE))
{
// split the poly!
int i,t=0;