1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-19 13:40:49 +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

@@ -188,6 +188,7 @@ OpenGl_Context::OpenGl_Context (const Handle(OpenGl_Caps)& theCaps)
myReadBuffer (0),
myDrawBuffers (1),
myDefaultVao (0),
myColorMask (true),
myIsGlDebugCtx (Standard_False),
myResolution (Graphic3d_RenderingParams::THE_DEFAULT_RESOLUTION),
myResolutionRatio (1.0f),
@@ -3678,3 +3679,17 @@ void OpenGl_Context::DisableFeatures() const
}
#endif
}
// =======================================================================
// function : SetColorMask
// purpose :
// =======================================================================
bool OpenGl_Context::SetColorMask (bool theToWriteColor)
{
const GLboolean toWrite = theToWriteColor ? GL_TRUE : GL_FALSE;
glColorMask (toWrite, toWrite, toWrite, toWrite);
const bool anOldValue = myColorMask;
myColorMask = theToWriteColor;
return anOldValue;
}