mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-29 07:22:07 +00:00
- added a sector index to the subsector struct.
This will be used to process dynamic lights for flats in the processing pass, allowing to remove the lights-only pass entirely.
This commit is contained in:
parent
ecb1578a7a
commit
7aea010892
3 changed files with 6 additions and 27 deletions
|
@ -1437,27 +1437,4 @@ void P_SetRenderSector()
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#if 0 // may be useful later so let's keep it here for now
|
||||
// now group the subsectors by sector
|
||||
subsector_t ** subsectorbuffer = new subsector_t * [numsubsectors];
|
||||
|
||||
for(i=0, ss=subsectors; i<numsubsectors; i++, ss++)
|
||||
{
|
||||
ss->render_sector->subsectorcount++;
|
||||
}
|
||||
|
||||
for (i=0; i<numsectors; i++)
|
||||
{
|
||||
sectors[i].subsectors = subsectorbuffer;
|
||||
subsectorbuffer += sectors[i].subsectorcount;
|
||||
sectors[i].subsectorcount = 0;
|
||||
}
|
||||
|
||||
for(i=0, ss = subsectors; i<numsubsectors; i++, ss++)
|
||||
{
|
||||
ss->render_sector->subsectors[ss->render_sector->subsectorcount++]=ss;
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
|
|
|
@ -248,7 +248,7 @@ static void PrepareSectorData()
|
|||
|
||||
for (auto &sub : level.subsectors)
|
||||
{
|
||||
sub.render_sector->subsectorcount++;
|
||||
sub.sectorindex = (uint16_t)sub.render_sector->subsectorcount++;
|
||||
}
|
||||
|
||||
for (auto &sec : level.sectors)
|
||||
|
|
|
@ -1431,15 +1431,17 @@ struct subsector_t
|
|||
seg_t *firstline;
|
||||
sector_t *render_sector;
|
||||
uint32_t numlines;
|
||||
int flags;
|
||||
uint16_t flags;
|
||||
uint16_t sectorindex;
|
||||
|
||||
void BuildPolyBSP();
|
||||
int Index() const;
|
||||
// subsector related GL data
|
||||
FLightNode * lighthead; // Light nodes (blended and additive)
|
||||
int validcount;
|
||||
short mapsection;
|
||||
char hacked; // 1: is part of a render hack
|
||||
|
||||
void BuildPolyBSP();
|
||||
int Index() const;
|
||||
// 2: has one-sided walls
|
||||
FPortalCoverage portalcoverage[2];
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue