From 21cd88f322d6a46a8949bac204373d7fc936f52a Mon Sep 17 00:00:00 2001 From: Harald Steinlechner Date: Sun, 5 Jan 2025 11:21:17 +0100 Subject: [PATCH] keep invisible opcs in lod to enable fast switching, see https://github.com/pro3d-space/PRo3D/issues/484 & version bump --- TEST_RELEASE_NOTES.md | 3 +++ src/PRo3D.Core/Surface/Surface.Sg.fs | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/TEST_RELEASE_NOTES.md b/TEST_RELEASE_NOTES.md index 0ecacafc..2ec76e3d 100644 --- a/TEST_RELEASE_NOTES.md +++ b/TEST_RELEASE_NOTES.md @@ -1,3 +1,6 @@ +## 4.27.0-prerelease2 +- fixed lod when switching surfaces visible/invisible (keep invisible opcs in lod, to make fast switching possible) + ## 4.27.0-prerelease1 - coordinate frames as scale bars - fixed memory leak for high focal length fulcra diff --git a/src/PRo3D.Core/Surface/Surface.Sg.fs b/src/PRo3D.Core/Surface/Surface.Sg.fs index 3277cd25..b8ec8567 100644 --- a/src/PRo3D.Core/Surface/Surface.Sg.fs +++ b/src/PRo3D.Core/Surface/Surface.Sg.fs @@ -175,8 +175,10 @@ module Sg = (isActive : aval) = - let isRenderingActive = isActive.GetValue self - if isRenderingActive then + let isRenderingActive = + //isActive.GetValue self, using isActive (actually is invisible) is not possible here, see https://github.com/pro3d-space/PRo3D/issues/484 + true + if isRenderingActive then let lodParams = lodParams.GetValue self let viewTrafo = viewTrafo.GetValue self let model = preTrafo * renderPatch.trafo.GetValue self