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 <noreply@anthropic.com>
This commit is contained in:
parent
506b86ba86
commit
81b5ed8c68
1 changed files with 22 additions and 0 deletions
22
src/AcDream.App/Rendering/Wb/WbFoundationFlag.cs
Normal file
22
src/AcDream.App/Rendering/Wb/WbFoundationFlag.cs
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
namespace AcDream.App.Rendering.Wb;
|
||||
|
||||
/// <summary>
|
||||
/// Process-lifetime cache of <c>ACDREAM_USE_WB_FOUNDATION</c> 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).
|
||||
///
|
||||
/// <para>
|
||||
/// Set <c>ACDREAM_USE_WB_FOUNDATION=1</c> to route static-scenery + atlas
|
||||
/// content through WB's <c>ObjectMeshManager</c>; per-instance customized
|
||||
/// content (server <c>CreateObject</c> entities) takes the existing
|
||||
/// <see cref="TextureCache.GetOrUploadWithPaletteOverride"/> path either
|
||||
/// way. Flag becomes default-on at end of Phase N.4 after visual
|
||||
/// verification.
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static class WbFoundationFlag
|
||||
{
|
||||
public static bool IsEnabled { get; } =
|
||||
System.Environment.GetEnvironmentVariable("ACDREAM_USE_WB_FOUNDATION") == "1";
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue