use super::*;
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
pub struct PassId(id::Id);
impl PassId {
pub fn next() -> Self {
Self(id::next())
}
}
#[derive(Debug, Clone)]
pub enum PassAction {
Nothing,
Clear {
color: Option<color::Rgba<f32>>,
depth: Option<f32>,
stencil: Option<i32>,
},
}
impl PassAction {
pub fn clear(color: impl Into<Rgba<f32>>) -> PassAction {
PassAction::Clear {
color: Some(color.into()),
depth: Some(1.),
stencil: None,
}
}
}
impl Default for PassAction {
fn default() -> PassAction {
PassAction::Clear {
color: Some(Rgba::TRANSPARENT),
depth: Some(1.),
stencil: None,
}
}
}
#[derive(Debug, Clone)]
pub struct PassDescriptor {
pub color_attachment: Option<TextureId>,
pub depth_attachment: Option<TextureId>,
}