Polymer: Reorganize main displayrooms loop a bit.

When walking the sectors, put more drawing work between queuing and
reaping the occlusion queries to potentially make them more efficient.

git-svn-id: https://svn.eduke32.com/eduke32@1976 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
plagman 2011-08-20 21:04:53 +00:00
parent 936147e33b
commit e7fc03ed33

View file

@ -1535,10 +1535,6 @@ static void polymer_displayrooms(int16_t dacursectnum)
i = sec->wallnum-1;
do
{
// this is a couple of fps faster for me... does it mess anything up?
if (wallvisible(globalposx, globalposy, sec->wallptr + i))
polymer_drawwall(sectorqueue[front], sec->wallptr + i);
// if we have a level boundary somewhere in the sector,
// consider these walls as visportals
if (wall[sec->wallptr + i].nextsector < 0)
@ -1637,6 +1633,16 @@ static void polymer_displayrooms(int16_t dacursectnum)
i--;
}
// Cram as much CPU or GPU work as we can between queuing the
// occlusion queries and reaping them.
i = sec->wallnum-1;
do
{
if (wallvisible(globalposx, globalposy, sec->wallptr + i))
polymer_drawwall(sectorqueue[front], sec->wallptr + i);
}
while (--i >= 0);
// queue ROR neighbors
if ((sec->floorstat & 1024) &&
(bunchnum = yax_getbunch(sectorqueue[front], YAX_FLOOR)) >= 0) {