1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-14 13:30:48 +03:00

0027735: Visualization, OpenGl_ShaderManager - fix clipping state management

OpenGl_CappingAlgo::RenderCapping() now updates clipping state in Shader Manager.
OpenGl_View::render() clipping state setup has been moved to OpenGl_View::renderScene().

OpenGl_ShaderManager now converts position to homogeneous coordinates within clipping code GLSL.
This fixes capping plane rendering with clipping planes applied.

Fixed possible Clipping planes misconfiguration when FFP is used;
error-prone OpenGl_Clipping::AddWorldLazy() method has been dropped.
This commit is contained in:
kgv
2016-08-05 20:58:13 +03:00
committed by bugmaster
parent c58b1b6257
commit deb02f8655
7 changed files with 31 additions and 49 deletions

View File

@@ -558,10 +558,7 @@ void OpenGl_Structure::Render (const Handle(OpenGl_Workspace) &theWorkspace) con
aCtx->ChangeClipping().AddWorld (aCtx, *aUserPlanes);
// Set OCCT state uniform variables
if (!aCtx->ShaderManager()->IsEmpty())
{
aCtx->ShaderManager()->UpdateClippingState();
}
aCtx->ShaderManager()->UpdateClippingState();
}
// Render groups
@@ -587,10 +584,7 @@ void OpenGl_Structure::Render (const Handle(OpenGl_Workspace) &theWorkspace) con
aCtx->ChangeClipping().Remove (aCtx, *aUserPlanes);
// Set OCCT state uniform variables
if (!aCtx->ShaderManager()->IsEmpty())
{
aCtx->ShaderManager()->RevertClippingState();
}
aCtx->ShaderManager()->RevertClippingState();
}
// Restore local transformation