Skip to main content

render_offscreen

Function render_offscreen 

Source
pub async fn render_offscreen(
    scene: &MeshScene,
    camera: OrbitCamera,
    width: u32,
    height: u32,
) -> Result<OffscreenImage, GpuError>
Expand description

Opens the default high-performance adapter, renders scene into a 1..=4096 pixel image and reads it back. For export and device checks; interactive views keep textures on the GPU with render_texture_cached.