pub fn render_offscreen<H>(
ctx: &mut <H as Hal>::Context,
recording: &Recording,
images: &[&<H as Hal>::Texture],
) -> Result<Vec<u8>, Error>Expand description
Draw a recording into a texture this crate did not create.
Context::draw covers the case where the target came from
Context::create_surface, and that is the ordinary one. This is the other:
a swapchain hands out its own images, and drawing into one means naming a
texture the caller got from somewhere else. Without this the presentation
path re-exported above reached a swapchain and then had nothing to draw into
its images with, which is a window a caller can open and not fill.
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.