Cull bsp using solid segments
This commit is contained in:
parent
95df9bf48e
commit
cffdfdf7fd
2 changed files with 142 additions and 4 deletions
13
src/r_poly.h
13
src/r_poly.h
|
|
@ -77,6 +77,11 @@ private:
|
|||
// Returns true if some part of the bbox might be visible.
|
||||
bool CheckBBox(float *bspcoord);
|
||||
|
||||
bool GetSegmentRangeForLine(double x1, double y1, double x2, double y2, int &sx1, int &sx2) const;
|
||||
|
||||
void MarkSegmentCulled(int x1, int x2);
|
||||
bool IsSegmentCulled(int x1, int x2) const;
|
||||
|
||||
std::vector<subsector_t *> PvsSectors;
|
||||
TriMatrix worldToClip;
|
||||
|
||||
|
|
@ -84,6 +89,14 @@ private:
|
|||
|
||||
const int BaseXCenter = 160;
|
||||
const int BaseYCenter = 100;
|
||||
|
||||
struct SolidSegment
|
||||
{
|
||||
SolidSegment(int x1, int x2) : X1(x1), X2(x2) { }
|
||||
int X1, X2;
|
||||
};
|
||||
|
||||
std::vector<SolidSegment> SolidSegments;
|
||||
};
|
||||
|
||||
class RenderPolyWall
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue