[][src]Trait ggez::graphics::ShaderHandle

pub trait ShaderHandle<Spec: BackendSpec>: Debug {
    fn draw(
        &self,
        encoder: &mut Encoder<Spec::Resources, Spec::CommandBuffer>,
        slice: &Slice<Spec::Resources>,
        data: &Data<Spec::Resources>
    ) -> GameResult;
fn set_blend_mode(&mut self, mode: BlendMode) -> GameResult;
fn blend_mode(&self) -> BlendMode; }

A trait that is used to create trait objects to abstract away the gfx::Structure<ConstFormat> type of the constant data for drawing

Required methods

fn draw(
    &self,
    encoder: &mut Encoder<Spec::Resources, Spec::CommandBuffer>,
    slice: &Slice<Spec::Resources>,
    data: &Data<Spec::Resources>
) -> GameResult

Draw with the current Shader

fn set_blend_mode(&mut self, mode: BlendMode) -> GameResult

Sets the shader program's blend mode

fn blend_mode(&self) -> BlendMode

Gets the shader program's current blend mode

Loading content...

Implementors

Loading content...