pub struct RenderUniformCollection {
pub _uniforms_f: HashMap<(u64, String), (UniformType, Vec<f32>)>,
pub _uniforms_groups: HashMap<u64, (u64, Vec<String>)>,
}Fields§
§_uniforms_f: HashMap<(u64, String), (UniformType, Vec<f32>)>§key: (shader_program_handle, uniform_name), val: uniform_vals
_uniforms_groups: HashMap<u64, (u64, Vec<String>)>§key: (group_id), val: (shader_program_handle, Vec<uniform_names>)
Implementations§
Source§impl RenderUniformCollection
impl RenderUniformCollection
Sourcepub fn set_uniform_f(
&mut self,
shader_program: u64,
name: &str,
val_type: UniformType,
vals: &[f32],
)
pub fn set_uniform_f( &mut self, shader_program: u64, name: &str, val_type: UniformType, vals: &[f32], )
§set uniform values to be sent to shader later
Sourcepub fn set_group(
&mut self,
shader_program: u64,
group_id: u64,
names: Vec<String>,
) -> Result<(), &'static str>
pub fn set_group( &mut self, shader_program: u64, group_id: u64, names: Vec<String>, ) -> Result<(), &'static str>
§group uniforms together
pub fn get_group( &self, group_id: u64, ) -> Result<Vec<(String, UniformType, Vec<f32>)>, &'static str>
Trait Implementations§
Source§impl Default for RenderUniformCollection
impl Default for RenderUniformCollection
Source§fn default() -> RenderUniformCollection
fn default() -> RenderUniformCollection
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for RenderUniformCollection
impl RefUnwindSafe for RenderUniformCollection
impl Send for RenderUniformCollection
impl Sync for RenderUniformCollection
impl Unpin for RenderUniformCollection
impl UnwindSafe for RenderUniformCollection
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more