mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-13 16:07:45 +00:00
- small but important optimization: Two-sided lines with both sides in the same sector don't really require vertex splitting for precise rendering.
This commit is contained in:
parent
00e4d4e2df
commit
b9ffb51d0c
3 changed files with 3 additions and 1 deletions
|
@ -99,6 +99,7 @@ public:
|
||||||
GLWF_GLOW=8, // illuminated by glowing flats
|
GLWF_GLOW=8, // illuminated by glowing flats
|
||||||
GLWF_NOSPLITUPPER=16,
|
GLWF_NOSPLITUPPER=16,
|
||||||
GLWF_NOSPLITLOWER=32,
|
GLWF_NOSPLITLOWER=32,
|
||||||
|
GLWF_NOSPLIT=64,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum
|
enum
|
||||||
|
|
|
@ -984,6 +984,7 @@ void GLWall::DoMidTexture(seg_t * seg, bool drawfogboundary,
|
||||||
//
|
//
|
||||||
FloatRect *splitrect;
|
FloatRect *splitrect;
|
||||||
int v = gltexture->GetAreas(&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))
|
||||||
{
|
{
|
||||||
// split the poly!
|
// split the poly!
|
||||||
|
|
|
@ -166,7 +166,7 @@ void GLWall::SetupLights()
|
||||||
void GLWall::RenderWall(int textured, unsigned int *store)
|
void GLWall::RenderWall(int textured, unsigned int *store)
|
||||||
{
|
{
|
||||||
static texcoord tcs[4]; // making this variable static saves us a relatively costly stack integrity check.
|
static texcoord tcs[4]; // making this variable static saves us a relatively costly stack integrity check.
|
||||||
bool split = (gl_seamless && !(textured&RWF_NOSPLIT) && seg->sidedef != NULL && !(seg->sidedef->Flags & WALLF_POLYOBJ));
|
bool split = (gl_seamless && !(textured&RWF_NOSPLIT) && seg->sidedef != NULL && !(seg->sidedef->Flags & WALLF_POLYOBJ) && !(flags & GLWF_NOSPLIT));
|
||||||
|
|
||||||
tcs[0]=lolft;
|
tcs[0]=lolft;
|
||||||
tcs[1]=uplft;
|
tcs[1]=uplft;
|
||||||
|
|
Loading…
Reference in a new issue