From fb107f80e668d012e0149e8e14af22a694556f8a Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 18 Sep 2021 13:07:59 +0200 Subject: [PATCH] - fixed vertex generation when splitting walls by planes on old hardware. --- src/rendering/hwrenderer/scene/hw_drawlist.cpp | 6 ++++-- src/rendering/hwrenderer/scene/hw_drawlist.h | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/rendering/hwrenderer/scene/hw_drawlist.cpp b/src/rendering/hwrenderer/scene/hw_drawlist.cpp index 902d68f29..872d5d419 100644 --- a/src/rendering/hwrenderer/scene/hw_drawlist.cpp +++ b/src/rendering/hwrenderer/scene/hw_drawlist.cpp @@ -268,7 +268,7 @@ void HWDrawList::SortPlaneIntoPlane(SortNode * head,SortNode * sort) // // //========================================================================== -void HWDrawList::SortWallIntoPlane(SortNode * head, SortNode * sort) +void HWDrawList::SortWallIntoPlane(HWDrawInfo* di, SortNode * head, SortNode * sort) { HWFlat * fh = flats[drawitems[head->itemindex].index]; HWWall * ws = walls[drawitems[sort->itemindex].index]; @@ -301,6 +301,8 @@ void HWDrawList::SortWallIntoPlane(SortNode * head, SortNode * sort) w->ztop[1] = ws->zbottom[1] = w->ztop[0] = ws->zbottom[0] = fh->z; w->tcs[HWWall::UPLFT].v = ws->tcs[HWWall::LOLFT].v = w->tcs[HWWall::UPRGT].v = ws->tcs[HWWall::LORGT].v = newtexv; } + w->MakeVertices(di, false); + ws->MakeVertices(di, false); } SortNode * sort2 = SortNodes.GetNew(); @@ -647,7 +649,7 @@ SortNode * HWDrawList::DoSort(HWDrawInfo *di, SortNode * head) break; case DrawType_WALL: - SortWallIntoPlane(head,node); + SortWallIntoPlane(di,head,node); break; case DrawType_SPRITE: diff --git a/src/rendering/hwrenderer/scene/hw_drawlist.h b/src/rendering/hwrenderer/scene/hw_drawlist.h index eaa0c471c..ee00ad91b 100644 --- a/src/rendering/hwrenderer/scene/hw_drawlist.h +++ b/src/rendering/hwrenderer/scene/hw_drawlist.h @@ -31,6 +31,7 @@ struct HWDrawItem HWDrawItemType rendertype; int index; + HWDrawItem() = default; // we need this for dynamic arrays. HWDrawItem(HWDrawItemType _rendertype,int _index) : rendertype(_rendertype),index(_index) {} }; @@ -99,7 +100,7 @@ public: SortNode * FindSortPlane(SortNode * head); SortNode * FindSortWall(SortNode * head); void SortPlaneIntoPlane(SortNode * head,SortNode * sort); - void SortWallIntoPlane(SortNode * head,SortNode * sort); + void SortWallIntoPlane(HWDrawInfo* di, SortNode * head,SortNode * sort); void SortSpriteIntoPlane(SortNode * head,SortNode * sort); void SortWallIntoWall(HWDrawInfo *di, SortNode * head,SortNode * sort); void SortSpriteIntoWall(HWDrawInfo *di, SortNode * head,SortNode * sort);