pub fn clear(color: Option<Color>, depth: bool, stencil: bool) {
    unsafe {
        if let Some(color) = color {
            gl::ClearColor(color.r, color.g, color.b, color.a);
        }
        let mut mask = 0;
        if color.is_some() { mask |= gl::COLOR_BUFFER_BIT }
        if depth           { mask |= gl::DEPTH_BUFFER_BIT }
        if stencil         { mask |= gl::STENCIL_BUFFER_BIT }
        gl::Clear(mask);
    }
}
/// Clears the currently bound framebuffer to the given color.
Clears the currently bound framebuffer to the given color.
Clears the currently bound framebuffer to the given color .
pub fn clear(color: Option<Color>, depth: bool, stencil: bool) {
    unsafe {
        if let Some(color) = color {
            gl::ClearColor(color.r, color.g, color.b, color.a);
        }
        let mut mask = 0;
        if color.is_some() { mask |= gl::COLOR_BUFFER_BIT }
        if depth           { mask |= gl::DEPTH_BUFFER_BIT }
        if stencil         { mask |= gl::STENCIL_BUFFER_BIT }
        gl::Clear(mask);
    }
}
pub fn clear ( color : Option < Color > , depth : bool , stencil : bool ) { unsafe { if let Some ( color ) = color { gl :: ClearColor ( color . r , color . g , color . b , color . a ) ; } let mut mask = 0 ; if color . is_some ( ) { mask |= gl :: COLOR_BUFFER_BIT } if depth { mask |= gl :: DEPTH_BUFFER_BIT } if stencil { mask |= gl :: STENCIL_BUFFER_BIT } gl :: Clear ( mask ) ; } }
Clears the currently bound framebuffer to the given color.
Clears the currently bound framebuffer to the given color .
color
Option<Color>
depth
bool
stencil
bool
color
Option<Color>
depth
bool
stencil
bool