From 4f5911da21e61f682fa0dd468521d20d74f01879 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Wed, 30 May 2018 15:46:53 +0300 Subject: [PATCH] - fixed rendering of environment map on mirrors With temporarily mapped buffer this feature seems to never work correctly With persistently mapped buffer it was broken in 9a1603b2467548cf3fe448dd9c41c5f84a7cc526 --- src/gl/scene/gl_walls_draw.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gl/scene/gl_walls_draw.cpp b/src/gl/scene/gl_walls_draw.cpp index 2dbe156dd..1180e557c 100644 --- a/src/gl/scene/gl_walls_draw.cpp +++ b/src/gl/scene/gl_walls_draw.cpp @@ -351,6 +351,9 @@ void FDrawInfo::AddMirrorSurface(GLWall *w) auto newwall = drawlists[GLDL_TRANSLUCENTBORDER].NewWall(); *newwall = *w; + // Invalidate vertices to allow setting of texture coordinates + newwall->vertcount = 0; + FVector3 v = newwall->glseg.Normal(); auto tcs = newwall->tcs; tcs[GLWall::LOLFT].u = tcs[GLWall::LORGT].u = tcs[GLWall::UPLFT].u = tcs[GLWall::UPRGT].u = v.X;