mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-25 05:21:16 +00:00
- fixed vertex generation when splitting walls by planes on old hardware.
This commit is contained in:
parent
614b8477b8
commit
fb107f80e6
2 changed files with 6 additions and 3 deletions
|
@ -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];
|
HWFlat * fh = flats[drawitems[head->itemindex].index];
|
||||||
HWWall * ws = walls[drawitems[sort->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->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->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();
|
SortNode * sort2 = SortNodes.GetNew();
|
||||||
|
@ -647,7 +649,7 @@ SortNode * HWDrawList::DoSort(HWDrawInfo *di, SortNode * head)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DrawType_WALL:
|
case DrawType_WALL:
|
||||||
SortWallIntoPlane(head,node);
|
SortWallIntoPlane(di,head,node);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DrawType_SPRITE:
|
case DrawType_SPRITE:
|
||||||
|
|
|
@ -31,6 +31,7 @@ struct HWDrawItem
|
||||||
HWDrawItemType rendertype;
|
HWDrawItemType rendertype;
|
||||||
int index;
|
int index;
|
||||||
|
|
||||||
|
HWDrawItem() = default; // we need this for dynamic arrays.
|
||||||
HWDrawItem(HWDrawItemType _rendertype,int _index) : rendertype(_rendertype),index(_index) {}
|
HWDrawItem(HWDrawItemType _rendertype,int _index) : rendertype(_rendertype),index(_index) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -99,7 +100,7 @@ public:
|
||||||
SortNode * FindSortPlane(SortNode * head);
|
SortNode * FindSortPlane(SortNode * head);
|
||||||
SortNode * FindSortWall(SortNode * head);
|
SortNode * FindSortWall(SortNode * head);
|
||||||
void SortPlaneIntoPlane(SortNode * head,SortNode * sort);
|
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 SortSpriteIntoPlane(SortNode * head,SortNode * sort);
|
||||||
void SortWallIntoWall(HWDrawInfo *di, SortNode * head,SortNode * sort);
|
void SortWallIntoWall(HWDrawInfo *di, SortNode * head,SortNode * sort);
|
||||||
void SortSpriteIntoWall(HWDrawInfo *di, SortNode * head,SortNode * sort);
|
void SortSpriteIntoWall(HWDrawInfo *di, SortNode * head,SortNode * sort);
|
||||||
|
|
Loading…
Reference in a new issue