Skip to main content

Module backend_init

Module backend_init 

Source
Expand description

Grouped construction inputs for the render backends, plus the requirements derivation that trims scene-scoped features when a world has no 3D content. GraphicsSystem init assembles a BackendInit from the drained world assets, calls resolve_requirements(), and hands it to the backend constructor selected at compile time (Metal / DirectX / Vulkan). Every backend receives the same struct; each reads the fields its feature set consumes.

Structs§

BackendInit
Everything a backend constructor needs, assembled once by GraphicsSystem init after the world’s assets have been drained and settings resolved.
MediaPayloads
Decoded image payloads: texture pools, glyph atlases, and the serialised IBL / grading payloads (None = the backend binds identity fallbacks).
PostSettings
Post-process and display settings resolved from PostProcessConfig (plus the user’s persisted overrides, the quality-preset ceiling, and the launch’s render requests). Every Option here is an init-time gate: None allocates nothing.
RenderRequirements
What the world’s content requires of the renderer. Derived from the assembled scene + fx data, backend-agnostic, so all three backends make identical trimming decisions.
SceneData
Static scene geometry and the draw lists built over it.
ShadowParams
Shadow-mapping knobs from GraphicsConfig. map_size == 0 disables the shadow pipeline and cascade array entirely.
SwapchainConfig
The swapchain-level configuration a backend bakes into its window / surface at construction: the ring depth and the HDR-output request that together fix the drawable pixel format and frames-in-flight sizing. A live world swap (RenderBackend::reload_world) can only reuse the existing window when these are unchanged; a difference forces a full backend rebuild (a new window). Kept small + Eq so the swap decision is one comparison.
WorldFx
World-authored effect content drained from components. Empty / None means the backend builds no pipelines or pools for that feature.
WorldShader
One world Shader as the backend receives it: the cook’s compiled programs, which the backend resolves per entry against the source it assembles (see each backend’s surface-source lookup), or nothing for the engine’s own program.