tge 0.0.4

A lightweight cross-platform 2D game framework written in pure Rust and based on OpenGL 3.3+.
Documentation

#[derive(Debug, Copy, Clone, Hash, Eq, PartialEq)]
pub enum Attachment {
    Color(u32),
    Depth,
    Stencil,
    DepthStencil,
}

impl Attachment {
    pub(crate) fn to_flag(&self) -> u32 {
        match self {
            Self::Color(i) => glow::COLOR_ATTACHMENT0 + *i,
            Self::Depth => glow::DEPTH_ATTACHMENT,
            Self::Stencil => glow::STENCIL_ATTACHMENT,
            Self::DepthStencil => glow::DEPTH_STENCIL_ATTACHMENT,
        }
    }
}