Move CheckUpdate to main thread and use the portal clip
This commit is contained in:
parent
ead947b8b0
commit
3e1f22e4c0
3 changed files with 7 additions and 14 deletions
|
|
@ -47,7 +47,7 @@
|
|||
#include "v_draw.h"
|
||||
#include "texturemanager.h"
|
||||
#include "actorinlines.h"
|
||||
#include "g_levellocals.h"
|
||||
#include "hw_vertexbuilder.h"
|
||||
#include "hw_lighting.h"
|
||||
#include "d_main.h"
|
||||
#include "swrenderer/r_swcolormaps.h"
|
||||
|
|
@ -463,6 +463,12 @@ void HWDrawInfo::RenderPVS(bool drawpsprites, FRenderState& state)
|
|||
for (int sideIndex : VisibleSet.SeenSides.Get())
|
||||
SeenSides.Add(sideIndex);
|
||||
|
||||
if (!gl_levelmesh) // Update sector heights for the non-levelmesh rendering of sectors
|
||||
{
|
||||
for (int sectorIndex : VisibleSet.SeenSectors.Get())
|
||||
CheckUpdate(state, &Level->sectors[sectorIndex]);
|
||||
}
|
||||
|
||||
Bsp.Unclock();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,9 +54,7 @@ void HWVisibleSet::FindPVS(HWDrawInfo* di)
|
|||
no_renderflags = TArrayView<uint8_t>(di->no_renderflags.data(), di->no_renderflags.size());
|
||||
section_renderflags = di->section_renderflags; // To do: RenderBSP modifies this
|
||||
ss_renderflags = di->ss_renderflags; // To do: RenderBSP modifies this
|
||||
#if NEEDS_PVS_PORTING
|
||||
mClipPortal = di->mClipPortal;
|
||||
#endif
|
||||
|
||||
drawctx.staticClipper.Clear();
|
||||
mClipper = &drawctx.staticClipper;
|
||||
|
|
@ -163,11 +161,6 @@ void HWVisibleSet::DoSubsector(subsector_t* sub)
|
|||
}
|
||||
}
|
||||
|
||||
if (validcount.sector[sector->Index()] != validcount.current)
|
||||
{
|
||||
CheckUpdate(sector);
|
||||
}
|
||||
|
||||
// [RH] Add particles
|
||||
if (gl_render_things && (sub->sprites.Size() > 0 || Level->ParticlesInSubsec[sub->Index()] != NO_PARTICLE))
|
||||
{
|
||||
|
|
@ -608,8 +601,3 @@ void HWVisibleSet::RenderParticles(subsector_t* sub, sector_t* front)
|
|||
SetupSprite.Unclock();
|
||||
#endif
|
||||
}
|
||||
|
||||
void HWVisibleSet::CheckUpdate(sector_t* sector)
|
||||
{
|
||||
// This updates the GPU vertices for the sector. Only needed if rendering flats without the level mesh.
|
||||
}
|
||||
|
|
|
|||
|
|
@ -63,7 +63,6 @@ private:
|
|||
void AddSpecialPortalLines(subsector_t* sub, sector_t* sector, linebase_t* line);
|
||||
void RenderParticles(subsector_t* sub, sector_t* front);
|
||||
void RenderThings(subsector_t* sub, sector_t* sector);
|
||||
void CheckUpdate(sector_t* sector);
|
||||
angle_t FrustumAngle();
|
||||
|
||||
struct
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue