- fixed render timing.

This commit is contained in:
Christoph Oelckers 2021-04-05 11:54:28 +02:00
parent 172e3996bb
commit de2df926e1

View file

@ -232,6 +232,8 @@ void BunchDrawer::ProcessBunch(int bnch)
//if (gl_render_walls) //if (gl_render_walls)
{ {
ClipWall.Unclock();
Bsp.Unclock();
SetupWall.Clock(); SetupWall.Clock();
HWWall hwwall; HWWall hwwall;
@ -239,6 +241,8 @@ void BunchDrawer::ProcessBunch(int bnch)
rendered_lines++; rendered_lines++;
SetupWall.Unclock(); SetupWall.Unclock();
Bsp.Clock();
ClipWall.Clock();
} }
} }
@ -462,7 +466,6 @@ void BunchDrawer::ProcessSector(int sectnum)
HWFlat flat; HWFlat flat;
flat.ProcessSector(di, &sector[sectnum]); flat.ProcessSector(di, &sector[sectnum]);
SetupFlat.Unclock(); SetupFlat.Unclock();
Bsp.Clock();
//Todo: process subsectors //Todo: process subsectors
inbunch = false; inbunch = false;
@ -508,7 +511,6 @@ void BunchDrawer::ProcessSector(int sectnum)
} }
if (thiswall->point2 != sect->wallptr + i + 1) inbunch = false; if (thiswall->point2 != sect->wallptr + i + 1) inbunch = false;
} }
Bsp.Unclock();
} }
//========================================================================== //==========================================================================
@ -519,6 +521,7 @@ void BunchDrawer::ProcessSector(int sectnum)
void BunchDrawer::RenderScene(const int* viewsectors, unsigned sectcount) void BunchDrawer::RenderScene(const int* viewsectors, unsigned sectcount)
{ {
Bsp.Clock();
for(unsigned i=0;i<sectcount;i++) for(unsigned i=0;i<sectcount;i++)
ProcessSector(viewsectors[i]); ProcessSector(viewsectors[i]);
while (Bunches.Size() > 0) while (Bunches.Size() > 0)
@ -527,4 +530,5 @@ void BunchDrawer::RenderScene(const int* viewsectors, unsigned sectcount)
ProcessBunch(closest); ProcessBunch(closest);
DeleteBunch(closest); DeleteBunch(closest);
} }
Bsp.Unclock();
} }