浏览代码

ENH: ctkVTKAbstractView: Update setUseDepthPeeling to also enable depth peel for volumes

This commit updates the method so that it also enables depth peeling for
volumes along with the translucent geometry. Only supported on OpenGL2
with dual-depth peeling.

Suggested-by: Ken Martin <ken.martin@kitware.com>
Jean-Christophe Fillion-Robin 7 年之前
父节点
当前提交
ec9622af13
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      Libs/Visualization/VTK/Widgets/ctkVTKAbstractView.cpp

+ 3 - 0
Libs/Visualization/VTK/Widgets/ctkVTKAbstractView.cpp

@@ -483,6 +483,9 @@ void ctkVTKAbstractView::setUseDepthPeeling(bool useDepthPeeling)
     }
   this->renderWindow()->SetMultiSamples(useDepthPeeling ? 0 : nSamples);
   renderer->SetUseDepthPeeling(useDepthPeeling ? 1 : 0);
+#if CTK_USE_QVTKOPENGLWIDGET
+  renderer->SetUseDepthPeelingForVolumes(useDepthPeeling);
+#endif
 }
 
 //----------------------------------------------------------------------------