pub fn render_solid_offscreen(
topo: &Topology,
solid: SolidId,
cam: &Camera,
opts: &RenderOpts,
) -> Result<RenderOutput, RenderError>Expand description
Render a solid offscreen to a shaded color image and a face-id buffer.
Tessellates solid, sets up a wgpu device (trying a real GPU first, then a
software fallback), rasterizes the mesh (and edges, if
RenderOpts::edges) into off-screen targets, and reads them back.
ยงErrors
RenderError::InvalidSizeifopts.widthoropts.heightis zero.RenderError::NoAdapterif no wgpu adapter (GPU or software) exists.RenderError::DeviceRequest/RenderError::BufferMap/RenderError::Pollon GPU setup or readback failure.RenderError::Operationsif tessellating the solid fails.