Struct bgfx_rs::static_lib::Uniform
source · pub struct Uniform { /* private fields */ }
Implementations§
source§impl Uniform
impl Uniform
sourcepub fn get_uniform_info(&self, info: &mut UniformInfo)
pub fn get_uniform_info(&self, info: &mut UniformInfo)
handle
: Handle to uniform object.info
: Uniform info.
source§impl Uniform
impl Uniform
sourcepub fn create(name: &str, type_r: UniformType, num: u16) -> Uniform
pub fn create(name: &str, type_r: UniformType, num: u16) -> Uniform
name
: Uniform name in shader.type_r
: Type of uniform (See:bgfx::UniformType
).num
: Number of elements in array.
sourcepub fn set_uniform(&self, value: &[f32], num: u16)
pub fn set_uniform(&self, value: &[f32], num: u16)
handle
: Uniform.value
: Pointer to uniform data.num
: Number of elements. Passingu16::MAX
will use the _num passed on uniform creation.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Uniform
impl RefUnwindSafe for Uniform
impl Send for Uniform
impl Sync for Uniform
impl Unpin for Uniform
impl UnwindSafe for Uniform
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