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

0028400: Visualization, Graphic3d_MaterialAspect - remove undocumented and unsupported flag EnvReflexion()

This commit is contained in:
kgv
2017-01-27 18:16:50 +03:00
committed by apn
parent 59edf905b1
commit 1a0dfc1bfd
9 changed files with 5 additions and 105 deletions

View File

@@ -938,54 +938,9 @@ void OpenGl_View::renderScene (Graphic3d_Camera::Projection theProjection,
aContext->ShaderManager()->UpdateClippingState();
}
// Clear status bitfields
myWorkspace->NamedStatus &= ~(OPENGL_NS_2NDPASSNEED | OPENGL_NS_2NDPASSDO);
// First pass
renderStructs (theProjection, theReadDrawFbo, theToDrawImmediate);
myWorkspace->DisableTexture();
// Second pass
if (myWorkspace->NamedStatus & OPENGL_NS_2NDPASSNEED)
{
myWorkspace->NamedStatus |= OPENGL_NS_2NDPASSDO;
// Remember OpenGl properties
GLint aSaveBlendDst = GL_ONE_MINUS_SRC_ALPHA, aSaveBlendSrc = GL_SRC_ALPHA;
GLint aSaveZbuffFunc;
GLboolean aSaveZbuffWrite;
glGetBooleanv (GL_DEPTH_WRITEMASK, &aSaveZbuffWrite);
glGetIntegerv (GL_DEPTH_FUNC, &aSaveZbuffFunc);
#if !defined(GL_ES_VERSION_2_0)
glGetIntegerv (GL_BLEND_DST, &aSaveBlendDst);
glGetIntegerv (GL_BLEND_SRC, &aSaveBlendSrc);
#endif
GLboolean wasZbuffEnabled = glIsEnabled (GL_DEPTH_TEST);
GLboolean wasBlendEnabled = glIsEnabled (GL_BLEND);
// Change the properties for second rendering pass
glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glEnable (GL_BLEND);
glDepthFunc (GL_EQUAL);
glDepthMask (GL_FALSE);
glEnable (GL_DEPTH_TEST);
// Render the view
renderStructs (theProjection, theReadDrawFbo, theToDrawImmediate);
myWorkspace->DisableTexture();
// Restore properties back
glBlendFunc (aSaveBlendSrc, aSaveBlendDst);
if (!wasBlendEnabled)
glDisable (GL_BLEND);
glDepthFunc (aSaveZbuffFunc);
glDepthMask (aSaveZbuffWrite);
if (!wasZbuffEnabled)
glDisable (GL_DEPTH_FUNC);
}
// Apply restored view matrix.
aContext->ApplyWorldViewMatrix();