Skip to content

[Feat] render lodSystem - #598

Open
Kenshin627 wants to merge 5 commits into
mainfrom
_feat_render_lod_system
Open

[Feat] render lodSystem#598
Kenshin627 wants to merge 5 commits into
mainfrom
_feat_render_lod_system

Conversation

@Kenshin627

Copy link
Copy Markdown

Summary

Introduce an LOD (Level of Detail) rendering system to optimize 3D viewport performance.

Changes

LOD System for Rendering (ec0c379)

  • Added LODSystem to dynamically adjust mesh detail based on camera distance, reducing GPU load in the 3D viewport.
  • Added CpuMemory utility (src/slic3r/Utils/CpuMemory.{hpp,cpp}) to query available system memory at runtime, providing a low-memory guard for LOD behavior.
  • Added IsMacVersion15() helper in MacUtils to detect macOS 15 at runtime, enabling a platform-specific LOD guard.
  • Extended Scene3D (3DScene.{hpp,cpp}) with LOD-aware rendering primitives.
  • Wired LOD control into GLCanvas3D and 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.txt

Testing

  •  Verified LOD mesh simplification renders correctly at various zoom levels.
  •  Verified low-memory guard triggers on constrained systems.
  •  Verified macOS 15+ guard applies correctly.
  •  macOS build succeeds (tested on macOS 15).

Kenshin627 and others added 5 commits July 21, 2026 15:17
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant