1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

0032143: Visualization - add option excluding transparent object from sorting

Added option Graphic3d_AlphaMode_MaskBlend combining Mask (no sorting)
and Blend (enable blending with background) behavior.
This commit is contained in:
kgv
2021-03-01 15:16:52 +03:00
committed by bugmaster
parent ba590cbf15
commit 33425a46b8
15 changed files with 105 additions and 18 deletions

View File

@@ -2552,6 +2552,11 @@ static Standard_Integer VAspects (Draw_Interpretor& theDI,
{
aChangeSet->AlphaMode = Graphic3d_AlphaMode_Blend;
}
else if (aParam == "maskblend"
|| aParam == "blendmask")
{
aChangeSet->AlphaMode = Graphic3d_AlphaMode_MaskBlend;
}
else if (aParam == "blendauto"
|| aParam == "auto")
{
@@ -6689,7 +6694,7 @@ void ViewerTest::Commands(Draw_Interpretor& theCommands)
"\n\t\t: [-faceBoundaryWidth LineWidth] [-faceBoundaryColor R G B] [-faceBoundaryType LineType]"
"\n\t\t: [-drawEdges {0|1}] [-edgeType LineType] [-edgeColor R G B] [-quadEdges {0|1}]"
"\n\t\t: [-drawSilhouette {0|1}]"
"\n\t\t: [-alphaMode {opaque|mask|blend|blendauto} [alphaCutOff=0.5]]"
"\n\t\t: [-alphaMode {opaque|mask|blend|maskblend|blendauto} [alphaCutOff=0.5]]"
"\n\t\t: [-dumpJson]"
"\n\t\t: [-dumpCompact {0|1}]"
"\n\t\t: [-dumpDepth depth]"

View File

@@ -9640,6 +9640,11 @@ static int VClipPlane (Draw_Interpretor& theDi, Standard_Integer theArgsNb, cons
{
aMode = Graphic3d_AlphaMode_Blend;
}
else if (aValStr == "maskblend"
|| aValStr == "blendmask")
{
aMode = Graphic3d_AlphaMode_MaskBlend;
}
else if (aValStr == "blendauto")
{
aMode = Graphic3d_AlphaMode_BlendAuto;