1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-09-03 14:10:33 +03:00

0029295: Visualization, TKOpenGl - provide distance culling option

Graphic3d_ZLayerSettings::CullingDistance() and ::CullingSize() - added
new properties configuring culling of small and distant objects, disabled by default.
OpenGl_BVHTreeSelector now handles size culling and distance culling in addition to frustom culling.
This commit is contained in:
kgv
2017-11-05 18:07:25 +03:00
committed by bugmaster
parent 761d880766
commit 4ecf34cce7
9 changed files with 245 additions and 30 deletions

View File

@@ -877,9 +877,10 @@ void OpenGl_View::render (Graphic3d_Camera::Projection theProjection,
}
#endif
// Update states of OpenGl_BVHTreeSelector (frustum culling algorithm).
// update states of OpenGl_BVHTreeSelector (frustum culling algorithm);
// note that we pass here window dimensions ignoring Graphic3d_RenderingParams::RenderResolutionScale
myBVHSelector.SetViewVolume (myCamera);
myBVHSelector.SetViewportSize (myWindow->Width(), myWindow->Height());
myBVHSelector.SetViewportSize (myWindow->Width(), myWindow->Height(), myRenderParams.ResolutionRatio());
const Handle(OpenGl_ShaderManager)& aManager = aContext->ShaderManager();
if (StateInfo (myCurrLightSourceState, aManager->LightSourceState().Index()) != myLastLightSourceState)