use crate::pipeline::StateMode;
#[derive(Clone, Copy, Debug)]
pub struct TessellationState {
pub patch_control_points: StateMode<u32>,
}
impl TessellationState {
#[inline]
pub fn new() -> Self {
Self {
patch_control_points: StateMode::Fixed(3),
}
}
#[inline]
pub fn patch_control_points(mut self, num: u32) -> Self {
self.patch_control_points = StateMode::Fixed(num);
self
}
#[inline]
pub fn patch_control_points_dynamic(mut self) -> Self {
self.patch_control_points = StateMode::Dynamic;
self
}
}
impl Default for TessellationState {
#[inline]
fn default() -> Self {
Self::new()
}
}