[Feat] render lodSystem - #598
Open
Kenshin627 wants to merge 5 commits into
Open
Conversation
Remove the "Improve rendering performance by LOD" preference item and its enable_lod config plumbing. LOD rendering is now always enabled, still gated by the low-memory and macOS-15 runtime guards. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… sysinfo sys/sysinfo.h is Linux-only and sysconf(_SC_AVPHYS_PAGES) is unsupported on macOS. Split the __APPLE__ branch out from __linux__ and query free memory via host_statistics64 (vm_statistics64) instead.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Introduce an LOD (Level of Detail) rendering system to optimize 3D viewport performance.
Changes
LOD System for Rendering (ec0c379)
LODSystemto dynamically adjust mesh detail based on camera distance, reducing GPU load in the 3D viewport.CpuMemoryutility (src/slic3r/Utils/CpuMemory.{hpp,cpp}) to query available system memory at runtime, providing a low-memory guard for LOD behavior.IsMacVersion15()helper inMacUtilsto detect macOS 15 at runtime, enabling a platform-specific LOD guard.Scene3D(3DScene.{hpp,cpp}) with LOD-aware rendering primitives.GLCanvas3Dand exposed a user-facing preference checkbox.Affected Areas
Area | Files -- | -- 3D rendering / LOD | src/slic3r/GUI/3DScene.{hpp,cpp}, src/slic3r/GUI/GLCanvas3D.{hpp,cpp} System memory query | src/slic3r/Utils/CpuMemory.{hpp,cpp} macOS platform utils | src/libslic3r/MacUtils.{hpp,mm} Preferences / config | src/libslic3r/AppConfig.cpp, src/slic3r/GUI/Preferences.cpp Localization | localization/i18n/{zh_CN,zh_TW}/Snapmaker_Orca_{zh_CN,zh_TW}.po Build | src/slic3r/CMakeLists.txtTesting