crystal-api 0.0.6

Crystal API is a unified GPU API's wrapper
Documentation
/// Unified init settings
#[derive(Default)]
#[allow(missing_docs)]
pub struct GraphicsApiInitSettings {
    pub msaa_samples: u8,
    pub width: u32,
    pub height: u32,
    pub vsync: bool,
}

#[allow(missing_docs)]
impl GraphicsApiInitSettings {
    pub fn msaa_samples(&self, msaa_samples: u8) -> Self {
        Self {
            msaa_samples,
            ..*self
        }
    }

    pub fn width(&self, width: u32) -> Self {
        Self { width, ..*self }
    }

    pub fn height(&self, height: u32) -> Self {
        Self { height, ..*self }
    }

    pub fn vsync(&self, vsync: bool) -> Self {
        Self { vsync, ..*self }
    }
}