[][src]Function lyon_extra::triangle_rasterizer::rasterize_triangles

pub fn rasterize_triangles<Constants, Vertex: VertexData, Target>(
    vertices: &[Vertex],
    indices: &[u16],
    constants: &Constants,
    target: &mut Target
) where
    Target: ShadingStage<Vertex, Constants>, 

A software triangle rasterizer intended for ref testing and to help debugging the output of the various tessellation routines.

The triangles are defined by sequences of 3 indices in the input buffers. For example, the first triangle is: { vertices[indices[0]], vertices[indices[1]], vertices[indices[2]] } the second triangle is: { vertices[indices[3]], vertices[indices[4]], vertices[indices[5]] } etc.

The rasterizer processes pixels by block of 4 and hands blocks containing at least one affected pixel to the ShadingStage.