From b1430e72bc252867289b45de9a94041841fade06 Mon Sep 17 00:00:00 2001 From: vsr Date: Thu, 6 May 2021 09:55:19 +0300 Subject: [PATCH] Add patch for OCCT for correct rendering transparent objects --- config/patches/occt.001_transparency.patch | 25 ++++++++++++++++++++++ config/salome.xml | 6 +++++- 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 config/patches/occt.001_transparency.patch diff --git a/config/patches/occt.001_transparency.patch b/config/patches/occt.001_transparency.patch new file mode 100644 index 0000000..175bd7e --- /dev/null +++ b/config/patches/occt.001_transparency.patch @@ -0,0 +1,25 @@ +diff -Naur OCCT-7.5.0p1_SRC_orig/src/OpenGl/OpenGl_LayerList.cxx OCCT-7.5.0p1_SRC_modif/src/OpenGl/OpenGl_LayerList.cxx +--- OCCT-7.5.0p1_SRC_orig/src/OpenGl/OpenGl_LayerList.cxx ++++ OCCT-7.5.0p1_SRC_modif/src/OpenGl/OpenGl_LayerList.cxx +@@ -889,7 +889,7 @@ + } + else + { +- aCtx->core11fwd->glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); ++ aCtx->core15fwd->glBlendFuncSeparate (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ONE, GL_ONE); + } + + // During blended order-independent transparency pass the depth test +diff -Naur OCCT-7.5.0p1_SRC_orig/src/OpenGl/OpenGl_View_Redraw.cxx OCCT-7.5.0p1_SRC_modif/src/OpenGl/OpenGl_View_Redraw.cxx +--- OCCT-7.5.0p1_SRC_orig/src/OpenGl/OpenGl_View_Redraw.cxx ++++ OCCT-7.5.0p1_SRC_modif/src/OpenGl/OpenGl_View_Redraw.cxx +@@ -933,7 +933,7 @@ + #endif + + const OpenGl_Vec4 aBgColor = aCtx->Vec4FromQuantityColor (myBgColor); +- glClearColor (aBgColor.r(), aBgColor.g(), aBgColor.b(), 0.0f); ++ glClearColor (aBgColor.r(), aBgColor.g(), aBgColor.b(), 1.0f); + + glClear (toClear); + + diff --git a/config/salome.xml b/config/salome.xml index 3fee4ed..2b988a8 100644 --- a/config/salome.xml +++ b/config/salome.xml @@ -73,7 +73,11 @@ - + + + + + -- 2.39.2