diff Samples/Common/RtViewerView.cpp @ 1433:8635b333fa5b

[BREAKING] VolumeSceneLayerSource now locks the viewport properly before using the scene. The ctor now accepts the viewport instead of a ref. to the scene. RtViewer sample has been adapted accordingly.
author Benjamin Golinvaux <bgo@osimis.io>
date Tue, 19 May 2020 13:22:48 +0200
parents 5d7ee14dc1eb
children 15173a383a00
line wrap: on
line diff
--- a/Samples/Common/RtViewerView.cpp	Fri May 15 21:14:35 2020 +0200
+++ b/Samples/Common/RtViewerView.cpp	Tue May 19 13:22:48 2020 +0200
@@ -312,7 +312,7 @@
     Scene2D& scene = controller.GetScene();
     int depth = scene.GetMaxDepth() + 1;
 
-    ctVolumeLayerSource_.reset(new OrthancStone::VolumeSceneLayerSource(scene, depth, volume));
+    ctVolumeLayerSource_.reset(new OrthancStone::VolumeSceneLayerSource(viewport_, depth, volume));
 
     if (style != NULL)
     {
@@ -328,7 +328,7 @@
     Scene2D& scene = controller.GetScene();
     int depth = scene.GetMaxDepth() + 1;
 
-    doseVolumeLayerSource_.reset(new OrthancStone::VolumeSceneLayerSource(scene, depth, volume));
+    doseVolumeLayerSource_.reset(new OrthancStone::VolumeSceneLayerSource(viewport_, depth, volume));
 
     if (style != NULL)
     {
@@ -343,6 +343,6 @@
     Scene2D& scene = controller.GetScene();
     int depth = scene.GetMaxDepth() + 1;
 
-    structLayerSource_.reset(new OrthancStone::VolumeSceneLayerSource(scene, depth, volume));
+    structLayerSource_.reset(new OrthancStone::VolumeSceneLayerSource(viewport_, depth, volume));
   }
 }
\ No newline at end of file