From 81b5ed8c6848141351c17c09a5e879cf42a6b3de Mon Sep 17 00:00:00 2001 From: Erik Date: Fri, 8 May 2026 13:06:12 +0200 Subject: [PATCH] phase(N.4): WbFoundationFlag scaffold for ACDREAM_USE_WB_FOUNDATION env var Creates the src/AcDream.App/Rendering/Wb/ folder and the static flag gate that other call sites will import. Read once at static-init time. Set ACDREAM_USE_WB_FOUNDATION=1 to enable WB foundation routing. Co-Authored-By: Claude Opus 4.6 --- .../Rendering/Wb/WbFoundationFlag.cs | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 src/AcDream.App/Rendering/Wb/WbFoundationFlag.cs diff --git a/src/AcDream.App/Rendering/Wb/WbFoundationFlag.cs b/src/AcDream.App/Rendering/Wb/WbFoundationFlag.cs new file mode 100644 index 0000000..16eff10 --- /dev/null +++ b/src/AcDream.App/Rendering/Wb/WbFoundationFlag.cs @@ -0,0 +1,22 @@ +namespace AcDream.App.Rendering.Wb; + +/// +/// Process-lifetime cache of ACDREAM_USE_WB_FOUNDATION env var. +/// Read once at static-init time; all consumers import this rather than +/// re-reading the env var per call (env-var lookups on Windows are not +/// free at hot-path cadence). +/// +/// +/// Set ACDREAM_USE_WB_FOUNDATION=1 to route static-scenery + atlas +/// content through WB's ObjectMeshManager; per-instance customized +/// content (server CreateObject entities) takes the existing +/// path either +/// way. Flag becomes default-on at end of Phase N.4 after visual +/// verification. +/// +/// +public static class WbFoundationFlag +{ + public static bool IsEnabled { get; } = + System.Environment.GetEnvironmentVariable("ACDREAM_USE_WB_FOUNDATION") == "1"; +}