Skip to main content

offscreen_world

Function offscreen_world 

Source
pub fn offscreen_world(
    device: Device,
    queue: Queue,
    capabilities: DeviceCapabilities,
    size: (u32, u32),
    samples: u32,
    depth: bool,
) -> (World, Entity)
Expand description

Build an empty offscreen world a host can serve over MCP.

The world holds a render context, a renderer, a mesh source, an input state and a default camera, and an offscreen colour target registered in the graph — both as a texture a screenshot can read back and as the view the renderer draws into. Returns the world and the renderer entity.