fn blend_mode(&mut self, blend_mode: BlendMode) {
        use self::BlendMode::*;

        unsafe {
            match blend_mode {
                SourceOver          => gl::BlendFuncSeparate(gl::SRC_ALPHA, gl::ONE_MINUS_SRC_ALPHA, gl::ONE, gl::ONE_MINUS_SRC_ALPHA),
                DestinationOver     => gl::BlendFuncSeparate(gl::ONE_MINUS_DST_ALPHA, gl::DST_ALPHA, gl::ONE_MINUS_DST_ALPHA, gl::ONE),
                SourceIn            => gl::BlendFuncSeparate(gl::DST_ALPHA, gl::ZERO, gl::DST_ALPHA, gl::ZERO),
                DestinationIn       => gl::BlendFuncSeparate(gl::ZERO, gl::SRC_ALPHA, gl::ZERO, gl::SRC_ALPHA),
                SourceOut           => gl::BlendFuncSeparate(gl::ZERO, gl::ONE_MINUS_DST_ALPHA, gl::ZERO, gl::ONE_MINUS_DST_ALPHA),
                DestinationOut      => gl::BlendFuncSeparate(gl::ZERO, gl::ONE_MINUS_SRC_ALPHA, gl::ZERO, gl::ONE_MINUS_SRC_ALPHA),
                SourceATop          => gl::BlendFuncSeparate(gl::ONE_MINUS_DST_ALPHA, gl::SRC_ALPHA, gl::ONE_MINUS_DST_ALPHA, gl::SRC_ALPHA),
                DestinationATop     => gl::BlendFuncSeparate(gl::ONE_MINUS_DST_ALPHA, gl::ONE_MINUS_SRC_ALPHA, gl::ONE_MINUS_DST_ALPHA, gl::ONE_MINUS_SRC_ALPHA),

                AllChannelAlphaSourceOver       => gl::BlendFuncSeparate(gl::ONE, gl::ONE_MINUS_SRC_COLOR, gl::ONE, gl::ONE_MINUS_SRC_ALPHA),
                AllChannelAlphaDestinationOver  => gl::BlendFuncSeparate(gl::ONE_MINUS_DST_COLOR, gl::ONE, gl::ONE_MINUS_DST_ALPHA, gl::ONE),
            }
        }
    }
///
/// Sets the blending mode to use
///
Sets the blending mode to use
Sets the blending mode to use
fn blend_mode(&mut self, blend_mode: BlendMode) {
        use self::BlendMode::*;
        unsafe {
            match blend_mode {
                SourceOver          => gl::BlendFuncSeparate(gl::SRC_ALPHA, gl::ONE_MINUS_SRC_ALPHA, gl::ONE, gl::ONE_MINUS_SRC_ALPHA),
                DestinationOver     => gl::BlendFuncSeparate(gl::ONE_MINUS_DST_ALPHA, gl::DST_ALPHA, gl::ONE_MINUS_DST_ALPHA, gl::ONE),
                SourceIn            => gl::BlendFuncSeparate(gl::DST_ALPHA, gl::ZERO, gl::DST_ALPHA, gl::ZERO),
                DestinationIn       => gl::BlendFuncSeparate(gl::ZERO, gl::SRC_ALPHA, gl::ZERO, gl::SRC_ALPHA),
                SourceOut           => gl::BlendFuncSeparate(gl::ZERO, gl::ONE_MINUS_DST_ALPHA, gl::ZERO, gl::ONE_MINUS_DST_ALPHA),
                DestinationOut      => gl::BlendFuncSeparate(gl::ZERO, gl::ONE_MINUS_SRC_ALPHA, gl::ZERO, gl::ONE_MINUS_SRC_ALPHA),
                SourceATop          => gl::BlendFuncSeparate(gl::ONE_MINUS_DST_ALPHA, gl::SRC_ALPHA, gl::ONE_MINUS_DST_ALPHA, gl::SRC_ALPHA),
                DestinationATop     => gl::BlendFuncSeparate(gl::ONE_MINUS_DST_ALPHA, gl::ONE_MINUS_SRC_ALPHA, gl::ONE_MINUS_DST_ALPHA, gl::ONE_MINUS_SRC_ALPHA),
                AllChannelAlphaSourceOver       => gl::BlendFuncSeparate(gl::ONE, gl::ONE_MINUS_SRC_COLOR, gl::ONE, gl::ONE_MINUS_SRC_ALPHA),
                AllChannelAlphaDestinationOver  => gl::BlendFuncSeparate(gl::ONE_MINUS_DST_COLOR, gl::ONE, gl::ONE_MINUS_DST_ALPHA, gl::ONE),
            }
        }
    }
fn blend_mode ( & mut self , blend_mode : BlendMode ) { use self :: BlendMode :: * ; unsafe { match blend_mode { SourceOver => gl :: BlendFuncSeparate ( gl :: SRC_ALPHA , gl :: ONE_MINUS_SRC_ALPHA , gl :: ONE , gl :: ONE_MINUS_SRC_ALPHA ) , DestinationOver => gl :: BlendFuncSeparate ( gl :: ONE_MINUS_DST_ALPHA , gl :: DST_ALPHA , gl :: ONE_MINUS_DST_ALPHA , gl :: ONE ) , SourceIn => gl :: BlendFuncSeparate ( gl :: DST_ALPHA , gl :: ZERO , gl :: DST_ALPHA , gl :: ZERO ) , DestinationIn => gl :: BlendFuncSeparate ( gl :: ZERO , gl :: SRC_ALPHA , gl :: ZERO , gl :: SRC_ALPHA ) , SourceOut => gl :: BlendFuncSeparate ( gl :: ZERO , gl :: ONE_MINUS_DST_ALPHA , gl :: ZERO , gl :: ONE_MINUS_DST_ALPHA ) , DestinationOut => gl :: BlendFuncSeparate ( gl :: ZERO , gl :: ONE_MINUS_SRC_ALPHA , gl :: ZERO , gl :: ONE_MINUS_SRC_ALPHA ) , SourceATop => gl :: BlendFuncSeparate ( gl :: ONE_MINUS_DST_ALPHA , gl :: SRC_ALPHA , gl :: ONE_MINUS_DST_ALPHA , gl :: SRC_ALPHA ) , DestinationATop => gl :: BlendFuncSeparate ( gl :: ONE_MINUS_DST_ALPHA , gl :: ONE_MINUS_SRC_ALPHA , gl :: ONE_MINUS_DST_ALPHA , gl :: ONE_MINUS_SRC_ALPHA ) , AllChannelAlphaSourceOver => gl :: BlendFuncSeparate ( gl :: ONE , gl :: ONE_MINUS_SRC_COLOR , gl :: ONE , gl :: ONE_MINUS_SRC_ALPHA ) , AllChannelAlphaDestinationOver => gl :: BlendFuncSeparate ( gl :: ONE_MINUS_DST_COLOR , gl :: ONE , gl :: ONE_MINUS_DST_ALPHA , gl :: ONE ) , } } }
Sets the blending mode to use
Sets the blending mode to use
&mut self
blend_mode
BlendMode