[][src]Trait euc::rasterizer::Rasterizer

pub trait Rasterizer {
type Input;
type Supplement;
    fn draw<P: Pipeline, T: Target<Item = P::Pixel>>(
        pipeline: &P,
        vertices: &[P::Vertex],
        target: &mut T,
        supplement: &mut Self::Supplement
    ); }

Represents a rasterization algorithm.

Associated Types

type Input

The type of input required during rasterization.

For most rasterization algorithms, this is the information that corresponds to a vertex position.

type Supplement

The type of any supplementary data required by the rasterization algorithm.

Examples of supplementary data include depth buffers, stencil buffers, etc.

Loading content...

Required methods

fn draw<P: Pipeline, T: Target<Item = P::Pixel>>(
    pipeline: &P,
    vertices: &[P::Vertex],
    target: &mut T,
    supplement: &mut Self::Supplement
)

Rasterize the provided vertex data and write the resulting fragment information to the target.

Loading content...

Implementors

impl<'a, D: Target<Item = f32>> Rasterizer for Lines<'a, D>[src]

type Input = [f32; 3]

type Supplement = &'a mut D

impl<'a, D: Target<Item = f32>, B: BackfaceMode> Rasterizer for Triangles<'a, D, B>[src]

type Input = [f32; 3]

type Supplement = &'a mut D

Loading content...