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>
22 lines
890 B
C#
22 lines
890 B
C#
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";
|
|
}
|