- Removed unused cull function argument

This commit is contained in:
Magnus Norddahl 2017-09-02 01:34:36 +02:00
parent e851734b33
commit fbaa3e7cb0
3 changed files with 15 additions and 15 deletions

View file

@ -252,7 +252,7 @@ void RenderPolyScene::RenderPolySubsector(subsector_t *sub, uint32_t subsectorDe
} }
// Render wall, and update culling info if its an occlusion blocker // Render wall, and update culling info if its an occlusion blocker
if (RenderPolyWall::RenderLine(WorldToClip, PortalPlane, Cull, line, frontsector, subsectorDepth, StencilValue, TranslucentObjects, LinePortals, LastPortalLine)) if (RenderPolyWall::RenderLine(WorldToClip, PortalPlane, line, frontsector, subsectorDepth, StencilValue, TranslucentObjects, LinePortals, LastPortalLine))
{ {
Cull.MarkSegmentCulled(angle1, angle2); Cull.MarkSegmentCulled(angle1, angle2);
} }
@ -344,12 +344,12 @@ void RenderPolyScene::RenderLine(subsector_t *sub, seg_t *line, sector_t *fronts
for (unsigned int i = 0; i < line->backsector->e->XFloor.ffloors.Size(); i++) for (unsigned int i = 0; i < line->backsector->e->XFloor.ffloors.Size(); i++)
{ {
F3DFloor *fakeFloor = line->backsector->e->XFloor.ffloors[i]; F3DFloor *fakeFloor = line->backsector->e->XFloor.ffloors[i];
RenderPolyWall::Render3DFloorLine(WorldToClip, PortalPlane, Cull, line, frontsector, subsectorDepth, StencilValue, fakeFloor, TranslucentObjects); RenderPolyWall::Render3DFloorLine(WorldToClip, PortalPlane, line, frontsector, subsectorDepth, StencilValue, fakeFloor, TranslucentObjects);
} }
} }
// Render wall, and update culling info if its an occlusion blocker // Render wall, and update culling info if its an occlusion blocker
if (RenderPolyWall::RenderLine(WorldToClip, PortalPlane, Cull, line, frontsector, subsectorDepth, StencilValue, TranslucentObjects, LinePortals, LastPortalLine)) if (RenderPolyWall::RenderLine(WorldToClip, PortalPlane, line, frontsector, subsectorDepth, StencilValue, TranslucentObjects, LinePortals, LastPortalLine))
{ {
Cull.MarkSegmentCulled(angle1, angle2); Cull.MarkSegmentCulled(angle1, angle2);
} }
@ -465,7 +465,7 @@ void RenderPolyScene::RenderTranslucent(int portalDepth)
} }
else if (!obj->thing) else if (!obj->thing)
{ {
obj->wall.Render(WorldToClip, PortalPlane, Cull); obj->wall.Render(WorldToClip, PortalPlane);
} }
else if ((obj->thing->renderflags & RF_SPRITETYPEMASK) == RF_WALLSPRITE) else if ((obj->thing->renderflags & RF_SPRITETYPEMASK) == RF_WALLSPRITE)
{ {

View file

@ -38,7 +38,7 @@
EXTERN_CVAR(Bool, r_drawmirrors) EXTERN_CVAR(Bool, r_drawmirrors)
EXTERN_CVAR(Bool, r_fogboundary) EXTERN_CVAR(Bool, r_fogboundary)
bool RenderPolyWall::RenderLine(const TriMatrix &worldToClip, const PolyClipPlane &clipPlane, PolyCull &cull, seg_t *line, sector_t *frontsector, uint32_t subsectorDepth, uint32_t stencilValue, std::vector<PolyTranslucentObject*> &translucentWallsOutput, std::vector<std::unique_ptr<PolyDrawLinePortal>> &linePortals, line_t *lastPortalLine) bool RenderPolyWall::RenderLine(const TriMatrix &worldToClip, const PolyClipPlane &clipPlane, seg_t *line, sector_t *frontsector, uint32_t subsectorDepth, uint32_t stencilValue, std::vector<PolyTranslucentObject*> &translucentWallsOutput, std::vector<std::unique_ptr<PolyDrawLinePortal>> &linePortals, line_t *lastPortalLine)
{ {
double frontceilz1 = frontsector->ceilingplane.ZatPoint(line->v1); double frontceilz1 = frontsector->ceilingplane.ZatPoint(line->v1);
double frontfloorz1 = frontsector->floorplane.ZatPoint(line->v1); double frontfloorz1 = frontsector->floorplane.ZatPoint(line->v1);
@ -105,7 +105,7 @@ bool RenderPolyWall::RenderLine(const TriMatrix &worldToClip, const PolyClipPlan
wall.Wallpart = side_t::mid; wall.Wallpart = side_t::mid;
wall.Texture = GetTexture(wall.Line, wall.Side, side_t::mid); wall.Texture = GetTexture(wall.Line, wall.Side, side_t::mid);
wall.Polyportal = polyportal; wall.Polyportal = polyportal;
wall.Render(worldToClip, clipPlane, cull); wall.Render(worldToClip, clipPlane);
return true; return true;
} }
} }
@ -141,7 +141,7 @@ bool RenderPolyWall::RenderLine(const TriMatrix &worldToClip, const PolyClipPlan
wall.BottomTexZ = MIN(MIN(backceilz1, frontceilz1), MIN(backceilz2, frontceilz2)); wall.BottomTexZ = MIN(MIN(backceilz1, frontceilz1), MIN(backceilz2, frontceilz2));
wall.Wallpart = side_t::top; wall.Wallpart = side_t::top;
wall.Texture = GetTexture(wall.Line, wall.Side, side_t::top); wall.Texture = GetTexture(wall.Line, wall.Side, side_t::top);
wall.Render(worldToClip, clipPlane, cull); wall.Render(worldToClip, clipPlane);
} }
if ((bottomfloorz1 < bottomceilz1 || bottomfloorz2 < bottomceilz2) && line->sidedef && !bothSkyFloor) if ((bottomfloorz1 < bottomceilz1 || bottomfloorz2 < bottomceilz2) && line->sidedef && !bothSkyFloor)
@ -153,7 +153,7 @@ bool RenderPolyWall::RenderLine(const TriMatrix &worldToClip, const PolyClipPlan
wall.UnpeggedCeil2 = topceilz2; wall.UnpeggedCeil2 = topceilz2;
wall.Wallpart = side_t::bottom; wall.Wallpart = side_t::bottom;
wall.Texture = GetTexture(wall.Line, wall.Side, side_t::bottom); wall.Texture = GetTexture(wall.Line, wall.Side, side_t::bottom);
wall.Render(worldToClip, clipPlane, cull); wall.Render(worldToClip, clipPlane);
} }
if (line->sidedef) if (line->sidedef)
@ -175,7 +175,7 @@ bool RenderPolyWall::RenderLine(const TriMatrix &worldToClip, const PolyClipPlan
if (polyportal) if (polyportal)
{ {
wall.Polyportal = polyportal; wall.Polyportal = polyportal;
wall.Render(worldToClip, clipPlane, cull); wall.Render(worldToClip, clipPlane);
} }
} }
} }
@ -189,7 +189,7 @@ bool RenderPolyWall::IsFogBoundary(sector_t *front, sector_t *back)
(front->GetTexture(sector_t::ceiling) != skyflatnum || back->GetTexture(sector_t::ceiling) != skyflatnum); (front->GetTexture(sector_t::ceiling) != skyflatnum || back->GetTexture(sector_t::ceiling) != skyflatnum);
} }
void RenderPolyWall::Render3DFloorLine(const TriMatrix &worldToClip, const PolyClipPlane &clipPlane, PolyCull &cull, seg_t *line, sector_t *frontsector, uint32_t subsectorDepth, uint32_t stencilValue, F3DFloor *fakeFloor, std::vector<PolyTranslucentObject*> &translucentWallsOutput) void RenderPolyWall::Render3DFloorLine(const TriMatrix &worldToClip, const PolyClipPlane &clipPlane, seg_t *line, sector_t *frontsector, uint32_t subsectorDepth, uint32_t stencilValue, F3DFloor *fakeFloor, std::vector<PolyTranslucentObject*> &translucentWallsOutput)
{ {
if (!(fakeFloor->flags & FF_EXISTS)) return; if (!(fakeFloor->flags & FF_EXISTS)) return;
if (!(fakeFloor->flags & FF_RENDERPLANES)) return; if (!(fakeFloor->flags & FF_RENDERPLANES)) return;
@ -235,7 +235,7 @@ void RenderPolyWall::Render3DFloorLine(const TriMatrix &worldToClip, const PolyC
wall.Texture = GetTexture(wall.Line, wall.Side, side_t::mid); wall.Texture = GetTexture(wall.Line, wall.Side, side_t::mid);
if (!wall.Masked) if (!wall.Masked)
wall.Render(worldToClip, clipPlane, cull); wall.Render(worldToClip, clipPlane);
else else
translucentWallsOutput.push_back(PolyRenderer::Instance()->FrameMemory.NewObject<PolyTranslucentObject>(wall)); translucentWallsOutput.push_back(PolyRenderer::Instance()->FrameMemory.NewObject<PolyTranslucentObject>(wall));
} }
@ -250,7 +250,7 @@ void RenderPolyWall::SetCoords(const DVector2 &v1, const DVector2 &v2, double ce
this->floor2 = floor2; this->floor2 = floor2;
} }
void RenderPolyWall::Render(const TriMatrix &worldToClip, const PolyClipPlane &clipPlane, PolyCull &cull) void RenderPolyWall::Render(const TriMatrix &worldToClip, const PolyClipPlane &clipPlane)
{ {
bool foggy = false; bool foggy = false;
if (!Texture && !Polyportal && !FogBoundary) if (!Texture && !Polyportal && !FogBoundary)

View file

@ -31,11 +31,11 @@ class PolyCull;
class RenderPolyWall class RenderPolyWall
{ {
public: public:
static bool RenderLine(const TriMatrix &worldToClip, const PolyClipPlane &clipPlane, PolyCull &cull, seg_t *line, sector_t *frontsector, uint32_t subsectorDepth, uint32_t stencilValue, std::vector<PolyTranslucentObject*> &translucentWallsOutput, std::vector<std::unique_ptr<PolyDrawLinePortal>> &linePortals, line_t *lastPortalLine); static bool RenderLine(const TriMatrix &worldToClip, const PolyClipPlane &clipPlane, seg_t *line, sector_t *frontsector, uint32_t subsectorDepth, uint32_t stencilValue, std::vector<PolyTranslucentObject*> &translucentWallsOutput, std::vector<std::unique_ptr<PolyDrawLinePortal>> &linePortals, line_t *lastPortalLine);
static void Render3DFloorLine(const TriMatrix &worldToClip, const PolyClipPlane &clipPlane, PolyCull &cull, seg_t *line, sector_t *frontsector, uint32_t subsectorDepth, uint32_t stencilValue, F3DFloor *fakeFloor, std::vector<PolyTranslucentObject*> &translucentWallsOutput); static void Render3DFloorLine(const TriMatrix &worldToClip, const PolyClipPlane &clipPlane, seg_t *line, sector_t *frontsector, uint32_t subsectorDepth, uint32_t stencilValue, F3DFloor *fakeFloor, std::vector<PolyTranslucentObject*> &translucentWallsOutput);
void SetCoords(const DVector2 &v1, const DVector2 &v2, double ceil1, double floor1, double ceil2, double floor2); void SetCoords(const DVector2 &v1, const DVector2 &v2, double ceil1, double floor1, double ceil2, double floor2);
void Render(const TriMatrix &worldToClip, const PolyClipPlane &clipPlane, PolyCull &cull); void Render(const TriMatrix &worldToClip, const PolyClipPlane &clipPlane);
DVector2 v1; DVector2 v1;
DVector2 v2; DVector2 v2;