From: Viktor UZLOV Date: Wed, 5 May 2021 14:00:10 +0000 (+0300) Subject: Prevent VTK view becoming transparent when rendering transparent objects, when using... X-Git-Tag: V9_7_0rc1~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=9dbf92a7ba561692a7304101d4ab2ea2e7a7e04f;p=modules%2Fgui.git Prevent VTK view becoming transparent when rendering transparent objects, when using MESA --- diff --git a/src/SVTK/SVTK_ViewWindow.cxx b/src/SVTK/SVTK_ViewWindow.cxx index 67fccd088..bc5c84550 100644 --- a/src/SVTK/SVTK_ViewWindow.cxx +++ b/src/SVTK/SVTK_ViewWindow.cxx @@ -112,6 +112,9 @@ #include #endif +// Use workaround for rendering transparent object over MESA +#defing USE_WORKAROUND_FOR_MESA + namespace SVTK { int convertAction( const int accelAction ) @@ -251,6 +254,11 @@ void SVTK_ViewWindow::Initialize(SVTK_ViewModelBase* theModel) myKeyFreeInteractorStyle->AddObserver(SVTK::OperationFinished, myEventCallbackCommand.GetPointer(), 0.0); +#ifdef USE_WORKAROUND_FOR_MESA + char *mesavar = getenv("SALOME_USE_MESA"); + if (mesavar) + getRenderer()->SetUseDepthPeeling(1); +#endif //USE_WORKAROUND_FOR_MESA getRenderer()->SetBackgroundAlpha(1.0); myInteractor->getRenderWindow()->SetMultiSamples(0);