mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-09-03 14:10:33 +03:00
0029076: Visualization - implement element shrinking Shader
Aspect_IS_HOLLOW now an alias to Aspect_IS_EMPTY and Aspect_IS_HIDDENLINE does not implicitly enables mesh edges, so that Graphic3d_AspectFillArea3d::SetDrawEdges() should be set independently. OpenGl_ShaderManager now provides built-in GLSL programs for drawing mesh edges in single pass (and on OpenGL ES which does not provide glPolygonMode()). Graphic3d_RenderingParams::ToEnableAlphaToCoverage is now enabled by default and properly handled at TKOpenGl level - enables coverage for Graphic3d_AlphaMode_Mask primitives. OpenGl_PrimitiveArray now uses GLSL programs instead of glPolygonMode() by default, which can be managed by OpenGl_Caps::usePolygonMode flag (desktop OpenGL only). glPolygonMode() is also used as fallback regardless OpenGl_Caps::usePolygonMode flag when GLSL programs are not supported (Geometry Shaders are required) or stipple line style is required (not implemented within Face GLSL). vaspects command has been extended by -setInterior -setDrawEdges -setEdgeColor -setEdgeType -setEdgeWidth arguments replacing vsetinteriorstyle/vsetedgetype/vunsetedgetype commands. vaspects now accepts arguments without "set" prefix. ViewerTest::ParseColor() now parses RGBA color. Redundant command BUC60738 has been removed. AIS_ColorScale - fixed usage of uninitialized FillArea aspects.
This commit is contained in:
@@ -167,6 +167,7 @@ void OpenGl_View::Redraw()
|
||||
Graphic3d_Camera::Projection aProjectType = myCamera->ProjectionType();
|
||||
Handle(OpenGl_Context) aCtx = myWorkspace->GetGlContext();
|
||||
aCtx->FrameStats()->FrameStart (myWorkspace->View(), false);
|
||||
aCtx->SetLineFeather (myRenderParams.LineFeather);
|
||||
|
||||
// release pending GL resources
|
||||
aCtx->ReleaseDelayed();
|
||||
@@ -878,7 +879,9 @@ void OpenGl_View::render (Graphic3d_Camera::Projection theProjection,
|
||||
// ==================================
|
||||
|
||||
const Handle(OpenGl_Context)& aContext = myWorkspace->GetGlContext();
|
||||
aContext->SetSampleAlphaToCoverage (myRenderParams.ToEnableAlphaToCoverage);
|
||||
aContext->SetAllowSampleAlphaToCoverage (myRenderParams.ToEnableAlphaToCoverage
|
||||
&& theOutputFBO != NULL
|
||||
&& theOutputFBO->NbSamples() != 0);
|
||||
|
||||
#if !defined(GL_ES_VERSION_2_0)
|
||||
// Disable current clipping planes
|
||||
@@ -1043,6 +1046,7 @@ void OpenGl_View::render (Graphic3d_Camera::Projection theProjection,
|
||||
}
|
||||
|
||||
myWorkspace->ResetAppliedAspect();
|
||||
aContext->SetAllowSampleAlphaToCoverage (false);
|
||||
aContext->SetSampleAlphaToCoverage (false);
|
||||
|
||||
// reset FFP state for safety
|
||||
|
Reference in New Issue
Block a user