- moved the clipper out of GLSceneDrawer and let it be handled by HWDrawInfo.

The precise way the clipper needs to be maintained may differ between APIs, so it is no longer owned by any render structure but instead HWDrawInfo only contains a reference.
For OpenGL there is still only one static clipper because without multithreaded BSP traversal there is no need for more.
This commit is contained in:
Christoph Oelckers 2018-05-21 22:54:04 +02:00
commit df0b1e8dae
7 changed files with 30 additions and 27 deletions

View file

@ -214,7 +214,7 @@ void GLSceneDrawer::SetupView(float vx, float vy, float vz, DAngle va, bool mirr
void GLSceneDrawer::CreateScene(FDrawInfo *di)
{
angle_t a1 = FrustumAngle();
InitClipper(r_viewpoint.Angles.Yaw.BAMs() + a1, r_viewpoint.Angles.Yaw.BAMs() - a1);
di->mClipper->SafeAddClipRangeRealAngles(r_viewpoint.Angles.Yaw.BAMs() + a1, r_viewpoint.Angles.Yaw.BAMs() - a1);
// reset the portal manager
GLPortal::StartFrame();