Skip to main content

render_solid_offscreen

Function render_solid_offscreen 

Source
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