diff --git a/src/gl/scene/gl_wall.h b/src/gl/scene/gl_wall.h index 37501c6078..a317ac267b 100644 --- a/src/gl/scene/gl_wall.h +++ b/src/gl/scene/gl_wall.h @@ -99,6 +99,7 @@ public: GLWF_GLOW=8, // illuminated by glowing flats GLWF_NOSPLITUPPER=16, GLWF_NOSPLITLOWER=32, + GLWF_NOSPLIT=64, }; enum diff --git a/src/gl/scene/gl_walls.cpp b/src/gl/scene/gl_walls.cpp index cd179a2653..ab6d710d4f 100644 --- a/src/gl/scene/gl_walls.cpp +++ b/src/gl/scene/gl_walls.cpp @@ -984,6 +984,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)) { // split the poly! diff --git a/src/gl/scene/gl_walls_draw.cpp b/src/gl/scene/gl_walls_draw.cpp index 98bc9f661d..c4576acc86 100644 --- a/src/gl/scene/gl_walls_draw.cpp +++ b/src/gl/scene/gl_walls_draw.cpp @@ -166,7 +166,7 @@ void GLWall::SetupLights() void GLWall::RenderWall(int textured, unsigned int *store) { 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[1]=uplft;