Struct opengl_graphics::shader_uniforms::ShaderUniform
source · [−]pub struct ShaderUniform<T: ?Sized> { /* private fields */ }
Expand description
Describes a shader uniform of a given type.
Implementations
sourceimpl ShaderUniform<SUFloat>
impl ShaderUniform<SUFloat>
sourcepub fn set(&self, gl: &GlGraphics, value: f32)
pub fn set(&self, gl: &GlGraphics, value: f32)
Set the value of the float uniform.
sourceimpl ShaderUniform<SUInt>
impl ShaderUniform<SUInt>
sourcepub fn set(&self, gl: &GlGraphics, value: i32)
pub fn set(&self, gl: &GlGraphics, value: i32)
Set the value of the integer uniform.
sourceimpl ShaderUniform<SUVec2>
impl ShaderUniform<SUVec2>
sourceimpl ShaderUniform<SUVec3>
impl ShaderUniform<SUVec3>
sourceimpl ShaderUniform<SUVec4>
impl ShaderUniform<SUVec4>
sourceimpl ShaderUniform<SUMat2x2>
impl ShaderUniform<SUMat2x2>
sourceimpl ShaderUniform<SUMat3x3>
impl ShaderUniform<SUMat3x3>
sourceimpl ShaderUniform<SUMat4x4>
impl ShaderUniform<SUMat4x4>
Trait Implementations
sourceimpl<T: Clone + ?Sized> Clone for ShaderUniform<T>
impl<T: Clone + ?Sized> Clone for ShaderUniform<T>
sourcefn clone(&self) -> ShaderUniform<T>
fn clone(&self) -> ShaderUniform<T>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl<T: Copy + ?Sized> Copy for ShaderUniform<T>
Auto Trait Implementations
impl<T: ?Sized> RefUnwindSafe for ShaderUniform<T> where
T: RefUnwindSafe,
impl<T: ?Sized> Send for ShaderUniform<T> where
T: Send,
impl<T: ?Sized> Sync for ShaderUniform<T> where
T: Sync,
impl<T: ?Sized> Unpin for ShaderUniform<T> where
T: Unpin,
impl<T: ?Sized> UnwindSafe for ShaderUniform<T> where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more