]> SALOME platform Git repositories - tools/configuration.git/commitdiff
Salome HOME
Add patch for OCCT for correct rendering transparent objects V9_7_BR V9_7_0 V9_7_0rc1 V9_7_0rc2
authorvsr <vsr@opencascade.com>
Thu, 6 May 2021 06:55:19 +0000 (09:55 +0300)
committervsr <vsr@opencascade.com>
Thu, 6 May 2021 06:55:19 +0000 (09:55 +0300)
config/patches/occt.001_transparency.patch [new file with mode: 0644]
config/salome.xml

diff --git a/config/patches/occt.001_transparency.patch b/config/patches/occt.001_transparency.patch
new file mode 100644 (file)
index 0000000..175bd7e
--- /dev/null
@@ -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);
+
index 3fee4ed1d80393f2e0e118aeb3c0fba85f954166..2b988a864174e8c2fface317b8bf404a92a52bf5 100644 (file)
       <patch comment="Fix problem with shell command" name="numpy.001_shell.patch" sha1="d004dfb9053fcc7bcdc021e8c7aa3eb552a80452" />
     </patches>
   </product>
-  <product name="occt" version="7.5.0p1" />
+  <product name="occt" version="7.5.0p1">
+    <patches>
+      <patch comment="Fix problem with rendering transparent objects" name="occt.001_transparency.patch" sha1="958c573a558397560a2d5bcc0ee4e3b7258ee7fe" />
+    </patches>
+  </product>
   <product name="omniorb" version="4.2.2" />
   <product name="omniorbpy" version="4.2.2" />
   <product name="opencv" version="3.2.0">