Skip to main content

bind_background_textures

Function bind_background_textures 

Source
pub fn bind_background_textures(
    commands: Commands<'_, '_>,
    targets: Res<'_, RenderTargets>,
    nodes: Query<'_, '_, (Entity, &RBackgroundTexture, &mut ImageNode)>,
)
Expand description

Point every background-texture node’s ImageNode at the registry texture for its RBackgroundTexture name (or the shared transparent placeholder while unregistered) — the backgroundImage analogue of bind_portals, minus the binder recording (that is portal Resolution::Auto sizing semantics; a background never sizes its target). Only writes on change; a real swap marks layer content dirty so an enclosing cached layer repaints the late-bound pixels.