Struct rin::gl::basic_material::BasicMaterial[][src]

pub struct BasicMaterial<T = Texture> { /* fields omitted */ }

Material with a flat color and / or texture and gl properties

This material is not affected by lights or shadows

The texture can be a glin::Texture, a glin::TextureSampler or a reference or Rc to a texture

Implementations

impl<T> BasicMaterial<T>[src]

pub fn color(&self) -> AlphaColor<f32, Rgb<f32, Srgb>>[src]

Returns the material color or white if it was never set

impl<T> BasicMaterial<T> where
    T: Borrow<Texture>, 
[src]

pub fn texture(&self) -> Option<&Texture>[src]

Returns the material texture or None if it was never set

impl<'a> BasicMaterial<TextureSampler<'a>>[src]

pub fn texture_sampler(&self) -> Option<TextureSampler<'a>>[src]

Returns the material texture sample if it was setup with one or None if it was never set

Trait Implementations

impl Default for BasicMaterial<Texture>[src]

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

Auto Trait Implementations

impl<T = Texture> !RefUnwindSafe for BasicMaterial<T>

impl<T = Texture> !Send for BasicMaterial<T>

impl<T = Texture> !Sync for BasicMaterial<T>

impl<T> Unpin for BasicMaterial<T> where
    T: Unpin

impl<T = Texture> !UnwindSafe for BasicMaterial<T>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Any for T where
    T: Any
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Downcast for T where
    T: Any
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<V> IntoPnt<V> for V[src]

impl<V> IntoVec<V> for V[src]

impl<T> Pointable for T[src]

type Init = T

The type for initializers.

impl<T> Same<T> for T[src]

type Output = T

Should always be Self

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 
[src]

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
[src]