Trait rin_gl::Material[][src]

pub trait Material {
    fn program<R: RenderSurface>(&self, renderer: &Renderer<'_, R>) -> &Program;
fn uniforms<R: RenderSurface>(
        &self,
        renderer: &Renderer<'_, R>
    ) -> &[Uniform];
fn properties(&self) -> &[Property]; }

Common trait to all materials

The methods in this trait are usually only used internally by rin or other renderers to set the correct gl state to draw using the corresponding material

Required methods

fn program<R: RenderSurface>(&self, renderer: &Renderer<'_, R>) -> &Program[src]

returns the material glsl program

fn uniforms<R: RenderSurface>(&self, renderer: &Renderer<'_, R>) -> &[Uniform][src]

returns the uniforms to set when using the material glsl program

fn properties(&self) -> &[Property][src]

returns the gl properties to use when using this material

Loading content...

Implementations on Foreign Types

impl<M: Material + ?Sized> Material for Rc<M>[src]

impl<M: Material + ?Sized> Material for Box<M>[src]

impl<'a, M: Material + ?Sized> Material for &'a M[src]

Loading content...

Implementors

impl Material for OutlineMaterial[src]

impl Material for Program[src]

impl Material for rin_gl::ttf::Material[src]

impl<'a> Material for rin_gl::cubemap::Material<'a>[src]

impl<P: Borrow<Program>> Material for ShaderMaterial<P>[src]

impl<T: TextureUniformValue> Material for BasicMaterial<T>[src]

Loading content...