pub struct Material { /* private fields */ }
Expand description
Material, includes shader and maps
Implementations§
Source§impl Material
impl Material
Sourcepub fn shader(&self) -> &ManuallyDrop<Shader>
pub fn shader(&self) -> &ManuallyDrop<Shader>
Material shader
Sourcepub fn shader_mut(&mut self) -> &mut ManuallyDrop<Shader>
pub fn shader_mut(&mut self) -> &mut ManuallyDrop<Shader>
Material shader
Sourcepub fn maps(&self) -> &[MaterialMap]
pub fn maps(&self) -> &[MaterialMap]
Material maps array
Sourcepub fn maps_mut(&mut self) -> &mut [MaterialMap]
pub fn maps_mut(&mut self) -> &mut [MaterialMap]
Material maps array
Sourcepub fn params_mut(&mut self) -> &mut [f32; 4]
pub fn params_mut(&mut self) -> &mut [f32; 4]
Material generic parameters (if required)
Sourcepub fn set_texture(&mut self, map_type: MaterialMapIndex, texture: Texture2D)
pub fn set_texture(&mut self, map_type: MaterialMapIndex, texture: Texture2D)
Set texture for a material map type
Sourcepub fn as_raw(&self) -> &Material
pub fn as_raw(&self) -> &Material
Get the ‘raw’ ffi type Take caution when cloning so it doesn’t outlive the original
Sourcepub fn as_raw_mut(&mut self) -> &mut Material
pub fn as_raw_mut(&mut self) -> &mut Material
Get the ‘raw’ ffi type Take caution when cloning so it doesn’t outlive the original
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Material
impl RefUnwindSafe for Material
impl !Send for Material
impl !Sync for Material
impl Unpin 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