pub struct UniformBuffer {
pub name: String,
/* private fields */
}Expand description
A structured uniform buffer holding named f64 fields.
Fields§
§name: StringName of this uniform block.
Implementations§
Source§impl UniformBuffer
impl UniformBuffer
Sourcepub fn get_field(&self, name: &str) -> Option<f64>
pub fn get_field(&self, name: &str) -> Option<f64>
Get a named field value, or None if not set.
Sourcepub fn serialize(&mut self) -> &[u8] ⓘ
pub fn serialize(&mut self) -> &[u8] ⓘ
Serialise all fields to a byte vec (8 bytes per field, little-endian f64).
Fields are sorted by name for determinism.
Sourcepub fn field_count(&self) -> usize
pub fn field_count(&self) -> usize
Number of fields.
Trait Implementations§
Source§impl Clone for UniformBuffer
impl Clone for UniformBuffer
Source§fn clone(&self) -> UniformBuffer
fn clone(&self) -> UniformBuffer
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for UniformBuffer
impl RefUnwindSafe for UniformBuffer
impl Send for UniformBuffer
impl Sync for UniformBuffer
impl Unpin for UniformBuffer
impl UnsafeUnpin for UniformBuffer
impl UnwindSafe for UniformBuffer
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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