Expand description
Process-wide flags shared between the engine loop (library) and the
binary-only cn debug subsystem. Only the flags the library itself names
live here; the world.jsonl / shader-stage “changed” flags and the decal /
emitter spawn queue moved fully into the binary-only debug tree
(crate::debug), since nothing in the library references them.
ENABLED “are we running under a dev-loop entry point?” Set
once by main.rs’s Commands::Debug / Commands::Editor
arms before world build; read by GraphicsSystem::init
/ AnimationSystem / the draw list builder to enable
disk-first shader loading + the hot-reload source
capture. cn run leaves it false so production keeps
the static include_str!-baked path with no
filesystem dependency.
PENDING_ANIMATIONS “an Animation source changed.” Set by the cn debug
watcher / WS reload-assets handler; consumed by the
editor crate’s anim_reload::reload_clips_if_pending,
which the debug drive calls each frame to re-import
file-backed clips. The flag lives here (in the runtime
crate) because it bridges the runtime AnimationSystem,
which reads ENABLED, and the editor-driven hot-reload.
VALIDATION “did the launch request graphics validation?” Set by
the CLI --validation flag (cn run / cn debug).
Tri-state: unset defers to the build profile (on for
debug, off for release). resolve_validation settles
the two, and GraphicsSystem::init enables the
DirectX / Vulkan debug layers from the result. Metal’s
validation layer cannot be toggled from a running
process, so the CLI re-execs with the env var instead;
this flag does not drive Metal.
QUALITY_PRESET “did the launch force a master quality preset?” Set by
the CLI --quality-preset flag. Outranks the persisted
settings-menu choice at GraphicsSystem::init and is
never written back, so a probe / CI run can force a
preset (e.g. ultra, the only tier whose ceiling
permits ray-traced reflections) without touching
settings.bin. Unset leaves the persisted choice.
RT_DYNAMIC “how should the ray-tracing acceleration structure
track moving props?” Set by the CLI --rt-dynamic
flag; travels to the backends through
PostSettings::rt_dynamic. Unset resolves to Auto,
the shipping dirty-gated rebuild.
RT_SKINNED_GEOMETRY “may skinned meshes join the ray-tracing acceleration
structure?” Set by the CLI --rt-skinned-geometry
flag; travels to the backends through
PostSettings::rt_skinned_geometry. Unset leaves them
in, so clearing it isolates the skinned trace path.
WORLD_JSONL_PATH the world.jsonl the dev host is running. Set by the
editor’s cn debug / cn editor entry once the world
path is resolved; read by GraphicsSystem::init (only
under ENABLED) so the Prop-transform hot-reload watcher
knows which file to subscribe to. world.jsonl discovery
is authoring I/O that lives in concinnity-cook, which
the runtime does not link, so the dev host resolves the
path and hands it in rather than the engine looking it
up. Left None for cn run and embedded preview.
A static is the pragmatic shape here: the flags are process-wide because the
rendering backend is too (a single context per process owns the GPU), and
plumbing them through the public App / run_interpreted signatures would
touch far more code for the same observable behaviour.
Enums§
- Quality
Preset - Persisted master graphics-quality choice.
Autoresolves from the detected GPU tier each launch; a named tier (Low..Ultra) is a fixed ceiling;Customimposes no ceiling (the user’s per-row overrides drive). In GraphicsSettings aNone(never persisted) means “never configured”: the first launch seedsAutoand saves once. - RtDynamic
Mode - How the scene acceleration structure is kept current when props move.
Selected once at init from the launch’s
--rt-dynamicrequest;Autois the shipping behaviour and what an unset request resolves to.
Functions§
- set_
enabled - Mark this process as running under a dev-loop entry point. Call once before world build; the library only reads the flag.
- set_
pending_ animations - Raise the “Animation source changed” flag. Called by the asset hot-reload
watcher and the WS
reload-assetshandler; the library only reads it. - set_
quality_ preset - Record the CLI
--quality-presetrequest.Noneleaves the persisted settings-menu choice in effect. The library only reads it. - set_
rt_ dynamic - Record the CLI
--rt-dynamicrequest.Noneleaves the defaultAutoupdate mode in effect. The library only reads it. - set_
rt_ skinned_ geometry - Record the CLI
--rt-skinned-geometryrequest.Noneleaves skinned meshes in the acceleration structure. The library only reads it. - set_
validation - Record the CLI
--validationrequest.Noneleaves the build-profile default in effect;Someforces validation on or off. The library only reads it. - set_
world_ jsonl_ path - Record the world.jsonl path the dev host resolved, so the hot-reload watcher
can subscribe to it. Called by the editor’s
cn debug/cn editorentry before world build; the library only reads it. - take_
pending_ animations - Swap the “Animation source changed” flag to
false, returning whether it was set. The editor crate’sanim_reload::reload_clips_if_pendingcalls this; atrueresult kicks the per-clip re-import pass.