pub struct Material { /* private fields */ }Expand description
Material instance loaded on GPU.
Implementations§
Source§impl Material
impl Material
Sourcepub fn set_uniform<T>(&self, name: &str, uniform: T)
pub fn set_uniform<T>(&self, name: &str, uniform: T)
Set GPU uniform value for this material. “name” should be from “uniforms” list used for material creation. Otherwise uniform value would be silently ignored.
pub fn set_uniform_array<T>(&self, name: &str, uniform: &[T])where
T: ToBytes,
pub fn set_texture(&self, name: &str, texture: Texture2D)
Trait Implementations§
impl StructuralPartialEq for Material
Auto Trait Implementations§
impl Freeze for Material
impl RefUnwindSafe for Material
impl Send for Material
impl Sync for Material
impl Unpin for Material
impl UnsafeUnpin for Material
impl UnwindSafe for Material
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more