0031682: Visualization - Prs3d_ShadingAspect::SetTransparency() has no effect with...
[occt.git] / src / AIS / AIS_RubberBand.cxx
index d328b76..80641f0 100644 (file)
@@ -44,6 +44,7 @@ AIS_RubberBand::AIS_RubberBand()
   myDrawer->SetLineAspect (new Prs3d_LineAspect (Quantity_NOC_WHITE, Aspect_TOL_SOLID, 1.0));
   myDrawer->SetShadingAspect (new Prs3d_ShadingAspect());
   myDrawer->ShadingAspect()->SetMaterial (Graphic3d_NOM_PLASTIC);
+  myDrawer->ShadingAspect()->Aspect()->SetShadingModel (Graphic3d_TOSM_UNLIT);
   myDrawer->ShadingAspect()->Aspect()->SetInteriorStyle (Aspect_IS_EMPTY);
   myDrawer->ShadingAspect()->Aspect()->SetAlphaMode (Graphic3d_AlphaMode_Blend);
   myDrawer->ShadingAspect()->SetTransparency (1.0);
@@ -66,6 +67,7 @@ AIS_RubberBand::AIS_RubberBand (const Quantity_Color& theLineColor,
   myDrawer->SetLineAspect (new Prs3d_LineAspect (theLineColor, theLineType, theWidth));
   myDrawer->SetShadingAspect (new Prs3d_ShadingAspect());
   myDrawer->ShadingAspect()->SetMaterial (Graphic3d_NOM_PLASTIC);
+  myDrawer->ShadingAspect()->Aspect()->SetShadingModel (Graphic3d_TOSM_UNLIT);
   myDrawer->ShadingAspect()->Aspect()->SetInteriorStyle (Aspect_IS_EMPTY);
   myDrawer->ShadingAspect()->Aspect()->SetAlphaMode (Graphic3d_AlphaMode_Blend);
   myDrawer->ShadingAspect()->SetTransparency (1.0);
@@ -91,6 +93,7 @@ AIS_RubberBand::AIS_RubberBand (const Quantity_Color& theLineColor,
   myDrawer->SetShadingAspect (new Prs3d_ShadingAspect());
   myDrawer->ShadingAspect()->SetMaterial (Graphic3d_NOM_PLASTIC);
   myDrawer->ShadingAspect()->SetColor (theFillColor);
+  myDrawer->ShadingAspect()->Aspect()->SetShadingModel (Graphic3d_TOSM_UNLIT);
   myDrawer->ShadingAspect()->Aspect()->SetInteriorStyle (Aspect_IS_SOLID);
   myDrawer->ShadingAspect()->Aspect()->SetAlphaMode (Graphic3d_AlphaMode_Blend);
   myDrawer->ShadingAspect()->SetTransparency (theTransparency);