0028760: Visualization, TKOpenGl - avoid excessive frustum culling traverse within...
[occt.git] / src / OpenGl / OpenGl_View_Redraw.cxx
index b579c52..bc36fcc 100644 (file)
@@ -881,6 +881,7 @@ void OpenGl_View::render (Graphic3d_Camera::Projection theProjection,
   // note that we pass here window dimensions ignoring Graphic3d_RenderingParams::RenderResolutionScale
   myBVHSelector.SetViewVolume (myCamera);
   myBVHSelector.SetViewportSize (myWindow->Width(), myWindow->Height(), myRenderParams.ResolutionRatio());
+  myBVHSelector.CacheClipPtsProjections();
 
   const Handle(OpenGl_ShaderManager)& aManager   = aContext->ShaderManager();
   if (StateInfo (myCurrLightSourceState, aManager->LightSourceState().Index()) != myLastLightSourceState)
@@ -1058,6 +1059,8 @@ void OpenGl_View::renderStructs (Graphic3d_Camera::Projection theProjection,
     myRaytraceInitStatus == OpenGl_RT_FAIL ||
     aCtx->IsFeedback();
 
+  myZLayers.UpdateCulling (myWorkspace, theToDrawImmediate);
+
   if (!toRenderGL)
   {
     toRenderGL = !initRaytraceResources (aCtx) ||