diff --git a/src/rendering/hwrenderer/scene/hw_flats.cpp b/src/rendering/hwrenderer/scene/hw_flats.cpp index 46417bce8..2bd3a5c6d 100644 --- a/src/rendering/hwrenderer/scene/hw_flats.cpp +++ b/src/rendering/hwrenderer/scene/hw_flats.cpp @@ -126,8 +126,8 @@ void GLFlat::CreateSkyboxVertices(FFlatVertex *vert) vert[0].Set(minx, z, miny, uvals[rot & 3], vvals[rot & 3]); vert[1].Set(minx, z, maxy, uvals[(rot + 1) & 3], vvals[(rot + 1) & 3]); - vert[2].Set(maxx, z, maxy, uvals[(rot + 2) & 3], vvals[(rot + 2) & 3]); - vert[3].Set(maxx, z, miny, uvals[(rot + 3) & 3], vvals[(rot + 3) & 3]); + vert[2].Set(maxx, z, miny, uvals[(rot + 3) & 3], vvals[(rot + 3) & 3]); + vert[3].Set(maxx, z, maxy, uvals[(rot + 2) & 3], vvals[(rot + 2) & 3]); } //========================================================================== @@ -258,20 +258,20 @@ void GLFlat::DrawFloodPlanes(HWDrawInfo *di, FRenderState &state) state.SetEffect(EFF_STENCIL); state.EnableTexture(false); state.SetStencil(0, SOP_Increment, SF_ColorMaskOff); - state.Draw(DT_TriangleFan, fnode->vertexindex, 4); + state.Draw(DT_TriangleStrip, fnode->vertexindex, 4); // Draw projected plane into stencil state.EnableTexture(true); state.SetEffect(EFF_NONE); state.SetStencil(1, SOP_Keep, SF_DepthMaskOff); state.EnableDepthTest(false); - state.Draw(DT_TriangleFan, fnode->vertexindex + 4, 4); + state.Draw(DT_TriangleStrip, fnode->vertexindex + 4, 4); // clear stencil state.SetEffect(EFF_STENCIL); state.EnableTexture(false); state.SetStencil(1, SOP_Decrement, SF_ColorMaskOff | SF_DepthMaskOff); - state.Draw(DT_TriangleFan, fnode->vertexindex, 4); + state.Draw(DT_TriangleStrip, fnode->vertexindex, 4); // restore old stencil op. state.EnableTexture(true); @@ -330,7 +330,7 @@ void GLFlat::DrawFlat(HWDrawInfo *di, FRenderState &state, bool translucent) { state.SetMaterial(gltexture, CLAMP_XY, 0, -1); state.SetLightIndex(dynlightindex); - state.Draw(DT_TriangleFan,iboindex, 4); + state.Draw(DT_TriangleStrip,iboindex, 4); flatvertices += 4; flatprimitives++; } diff --git a/src/rendering/hwrenderer/scene/hw_renderhacks.cpp b/src/rendering/hwrenderer/scene/hw_renderhacks.cpp index dc4e11ca4..1a5d19779 100644 --- a/src/rendering/hwrenderer/scene/hw_renderhacks.cpp +++ b/src/rendering/hwrenderer/scene/hw_renderhacks.cpp @@ -679,8 +679,8 @@ void HWDrawInfo::CreateFloodStencilPoly(wallseg * ws, FFlatVertex *vertices) { vertices[0].Set(ws->x1, ws->z1, ws->y1, 0, 0); vertices[1].Set(ws->x1, ws->z2, ws->y1, 0, 0); - vertices[2].Set(ws->x2, ws->z2, ws->y2, 0, 0); - vertices[3].Set(ws->x2, ws->z1, ws->y2, 0, 0); + vertices[2].Set(ws->x2, ws->z1, ws->y2, 0, 0); + vertices[3].Set(ws->x2, ws->z2, ws->y2, 0, 0); } //========================================================================== @@ -712,8 +712,8 @@ void HWDrawInfo::CreateFloodPoly(wallseg * ws, FFlatVertex *vertices, float plan vertices[0].Set(px1, planez, py1, px1 / 64, -py1 / 64); vertices[1].Set(px2, planez, py2, px2 / 64, -py2 / 64); - vertices[2].Set(px3, planez, py3, px3 / 64, -py3 / 64); - vertices[3].Set(px4, planez, py4, px4 / 64, -py4 / 64); + vertices[2].Set(px4, planez, py4, px4 / 64, -py4 / 64); + vertices[3].Set(px3, planez, py3, px3 / 64, -py3 / 64); } //==========================================================================