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

0028760: Visualization, TKOpenGl - avoid excessive frustum culling traverse within extra OIT rendering pass

Culling traverse is no more called implicitly within OpenGl_Layer::Render().
Instead, all layers are traversed at onces within OpenGl_View::render() beforehand.

OpenGl_BVHTreeSelector methods have been renamed to better reflect their meaning.
Non-persistent culling options has been moved to dedicated structure OpenGl_BVHTreeSelector::CullingContext
so that OpenGl_BVHTreeSelector instance can be used for different Layers without modifying its state.
This commit is contained in:
kgv
2017-11-08 09:44:27 +03:00
parent daf73ab7c9
commit 2b8832bb0e
9 changed files with 202 additions and 168 deletions

View 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) ||