mod lines;
mod triangles;
pub use self::lines::Lines;
pub use self::triangles::Triangles;
use crate::{Pipeline, Target};
#[derive(Copy, Clone, Debug)]
pub enum DepthStrategy {
IfLessWrite,
IfMoreWrite,
IfLessNoWrite,
IfMoreNoWrite,
None,
}
pub trait BackfaceMode {
const ENABLED: bool;
}
pub struct BackfaceCullingDisabled;
impl BackfaceMode for BackfaceCullingDisabled {
const ENABLED: bool = false;
}
pub struct BackfaceCullingEnabled;
impl BackfaceMode for BackfaceCullingEnabled {
const ENABLED: bool = true;
}
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: Self::Supplement,
);
}