From be786cb64e1cd1425b1430617363ba0cfed81649 Mon Sep 17 00:00:00 2001 From: Ruochun Date: Sat, 17 Oct 2026 11:18:35 +0800 Subject: [PATCH] Disable visualizer by default in native builds --- CMakeLists.txt | 2 +- docs/installation.rst | 9 +++++---- docs/visualization.rst | 15 ++++++++++----- 3 files changed, 16 insertions(+), 10 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 133d823d..fe7bdb2d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -79,7 +79,7 @@ endif() option(DEME_BUILD_PYTHON "Build Python bindings for DEME" OFF) option(DEME_BUILD_DEMOS "Build DEME demos and modular tests" ON) option(DEME_BUILD_DOCS "Add the Doxygen and Sphinx documentation target" OFF) -option(DEME_BUILD_VISUALIZER "Build the native OpenGL/ImGui visualizer" ON) +option(DEME_BUILD_VISUALIZER "Build the native OpenGL/ImGui visualizer" OFF) # Find Python and pybind11 if building Python bindings if(DEME_BUILD_PYTHON) diff --git a/docs/installation.rst b/docs/installation.rst index 665d3ca3..4414e14e 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -14,10 +14,11 @@ DEME requires: * CMake 3.18 or newer and a CUDA-compatible C++ compiler when building from source. -The default source build also includes the interactive visualizer. On Linux, -install the X11 and OpenGL development headers listed in -`Interactive visualization `__. Set ``DEME_BUILD_VISUALIZER=OFF`` only for an explicitly -headless build; published Python wheels build the visualizer by default. +Ordinary CMake source builds omit the interactive visualizer by default. Enable +it with ``-DDEME_BUILD_VISUALIZER=ON`` and, on Linux, install the X11 and OpenGL +development headers listed in `Interactive visualization `__. +Python package builds explicitly enable the visualizer, so Python wheels still +include it by default. The exact Python, CUDA, compiler, driver, and GPU architecture matrix is being validated for DEM-Engine 3. A wheel should not be assumed portable across diff --git a/docs/visualization.rst b/docs/visualization.rst index 3f87853f..f5059ab3 100644 --- a/docs/visualization.rst +++ b/docs/visualization.rst @@ -2,8 +2,9 @@ Interactive visualization ========================= ``DEMVisualizer`` is a native OpenGL 3.3 simulation inspector with a Dear ImGui -sidebar and raylib window/input support. It is enabled in ordinary C++ builds -and Python wheels by default. Existing visualizer calls remain supported. +sidebar and raylib window/input support. It is optional in ordinary C++ builds +and included in Python wheels by default. Enable it in a CMake source build with +``-DDEME_BUILD_VISUALIZER=ON``. Existing visualizer calls remain supported. The viewer does not advance simulation time: each call to ``Render`` synchronously captures and displays the solver state at that moment. @@ -249,7 +250,7 @@ Linux build requirements ------------------------ Dear ImGui v1.91.9b is vendored with its MIT license; builds require no additional -download for the UI. The source build uses raylib's bundled GLFW backend and requires +download for the UI. When enabled, the source build uses raylib's bundled GLFW backend and requires the standard X11 and OpenGL development headers. On Debian or Ubuntu: .. code-block:: console @@ -262,11 +263,15 @@ container. At runtime, a graphical display and OpenGL implementation must be available. WSL users should run under WSLg or configure ``DISPLAY`` to an X server. -The visualizer can be omitted for a headless source build with: +The visualizer is off by default for ordinary CMake source builds. To enable it: .. code-block:: console - cmake -S . -B build -DDEME_BUILD_VISUALIZER=OFF + cmake -S . -B build -DDEME_BUILD_VISUALIZER=ON + +Existing build directories retain their cached setting. To disable the visualizer +in a previously configured build, pass ``-DDEME_BUILD_VISUALIZER=OFF`` explicitly. +Python package builds enable it explicitly through ``pyproject.toml``. Postprocessing with ParaView ----------------------------