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

0029300: Visualization, TKOpenGl - provide depth pre-pass option

OpenGl_LayerList::Render() now handles new option Graphic3d_RenderingParams::ToEnableDepthPrepass
which prepends additional pass to rendering pipeline filling Depth Buffer in advance.
This commit is contained in:
kgv
2017-11-08 00:11:57 +03:00
committed by bugmaster
parent 21b2385fcb
commit f88457e638
10 changed files with 303 additions and 85 deletions

View File

@@ -73,7 +73,7 @@ namespace
aContext->ShaderManager()->UpdateClippingState();
glClear (GL_STENCIL_BUFFER_BIT);
glColorMask (GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE);
const bool aColorMaskBack = aContext->SetColorMask (false);
// override aspects, disable culling
theWorkspace->SetAspectFace (&theWorkspace->NoneCulling());
@@ -116,7 +116,7 @@ namespace
aContext->ShaderManager()->UpdateClippingState();
// render capping plane using the generated stencil mask
glColorMask (GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
aContext->SetColorMask (aColorMaskBack);
if (theWorkspace->UseDepthWrite())
{
glDepthMask (GL_TRUE);