Skip to main content

render_offscreen

Function render_offscreen 

Source
pub fn render_offscreen<H>(
    ctx: &mut <H as Hal>::Context,
    recording: &Recording,
    images: &[&<H as Hal>::Texture],
) -> Result<Vec<u8>, Error>
where H: Hal, <H as Hal>::Context: HalContext<Hal = H>,
Expand description

Render a recording into a texture this function allocates, and read it back.

The offscreen path, which is what a comparison run wants: no surface, no presentation, just the pixels. The target is released whichever way the render went, so a failing recording does not leak a texture into the rest of a run.