pub struct Pass { /* private fields */ }Expand description
A struct representing a shader pass.
Implementations§
Source§impl Pass
impl Pass
Sourcepub fn set_grab_pass(&mut self, val: bool)
pub fn set_grab_pass(&mut self, val: bool)
Sets whether this Pass should be a grab pass. A grab pass will render a portion of game scene into a texture frame buffer. Then use this texture frame buffer as an input for next render pass.
Sourcepub fn is_grab_pass(&self) -> bool
pub fn is_grab_pass(&self) -> bool
Gets whether this Pass should be a grab pass. A grab pass will render a portion of game scene into a texture frame buffer. Then use this texture frame buffer as an input for next render pass.
Sourcepub fn set(&mut self, name: &str, val: f32)
pub fn set(&mut self, name: &str, val: f32)
Sets the value of shader parameters.
§Arguments
name- The name of the parameter to set.val- The numeric value to set.
Sourcepub fn set_vec4(
&mut self,
name: &str,
val_1: f32,
val_2: f32,
val_3: f32,
val_4: f32,
)
pub fn set_vec4( &mut self, name: &str, val_1: f32, val_2: f32, val_3: f32, val_4: f32, )
Sets the values of shader parameters.
§Arguments
name- The name of the parameter to set.val1- The first numeric value to set.val2- An optional second numeric value to set.val3- An optional third numeric value to set.val4- An optional fourth numeric value to set.
Sourcepub fn set_color(&mut self, name: &str, val: &Color)
pub fn set_color(&mut self, name: &str, val: &Color)
Another function that sets the values of shader parameters.
Works the same as: pass.set(“varName”, color.r / 255.0, color.g / 255.0, color.b / 255.0, color.opacity);
§Arguments
name- The name of the parameter to set.val- The Color object to set.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Pass
impl RefUnwindSafe for Pass
impl Send for Pass
impl Sync for Pass
impl Unpin for Pass
impl UnwindSafe for Pass
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