UniformType

Enum UniformType 

Source
pub enum UniformType {
Show 45 variants Int, UInt, Float, Double, Bool, IVec2, IVec3, IVec4, UIVec2, UIVec3, UIVec4, Vec2, Vec3, Vec4, DVec2, DVec3, DVec4, BVec2, BVec3, BVec4, M22, M33, M44, DM22, DM33, DM44, ISampler1D, ISampler2D, ISampler3D, ISampler1DArray, ISampler2DArray, UISampler1D, UISampler2D, UISampler3D, UISampler1DArray, UISampler2DArray, Sampler1D, Sampler2D, Sampler3D, Sampler1DArray, Sampler2DArray, ICubemap, UICubemap, Cubemap, ShaderDataBinding,
}
Expand description

Type of a uniform.

This is an exhaustive list of possible types of value you can send to a shader program. A UniformType is associated to any type that can be considered sent via the Uniformable trait.

Variants§

§

Int

32-bit signed integer.

§

UInt

32-bit unsigned integer.

§

Float

32-bit floating-point number.

§

Double

64-bit floating-point number.

§

Bool

Boolean.

§

IVec2

2D signed integral vector.

§

IVec3

3D signed integral vector.

§

IVec4

4D signed integral vector.

§

UIVec2

2D unsigned integral vector.

§

UIVec3

3D unsigned integral vector.

§

UIVec4

4D unsigned integral vector.

§

Vec2

2D floating-point vector.

§

Vec3

3D floating-point vector.

§

Vec4

4D floating-point vector.

§

DVec2

2D floating-point (double) vector.

§

DVec3

3D floating-point (double) vector.

§

DVec4

4D floating-point (double) vector.

§

BVec2

2D boolean vector.

§

BVec3

3D boolean vector.

§

BVec4

4D boolean vector.

§

M22

2×2 floating-point matrix.

§

M33

3×3 floating-point matrix.

§

M44

4×4 floating-point matrix.

§

DM22

2×2 floating-point (double) matrix.

§

DM33

3×3 floating-point (double) matrix.

§

DM44

4×4 floating-point (double) matrix.

§

ISampler1D

Signed integral 1D texture sampler.

§

ISampler2D

Signed integral 2D texture sampler.

§

ISampler3D

Signed integral 3D texture sampler.

§

ISampler1DArray

Signed integral 1D array texture sampler.

§

ISampler2DArray

Signed integral 2D array texture sampler.

§

UISampler1D

Unsigned integral 1D texture sampler.

§

UISampler2D

Unsigned integral 2D texture sampler.

§

UISampler3D

Unsigned integral 3D texture sampler.

§

UISampler1DArray

Unsigned integral 1D array texture sampler.

§

UISampler2DArray

Unsigned integral 2D array texture sampler.

§

Sampler1D

Floating-point 1D texture sampler.

§

Sampler2D

Floating-point 2D texture sampler.

§

Sampler3D

Floating-point 3D texture sampler.

§

Sampler1DArray

Floating-point 1D array texture sampler.

§

Sampler2DArray

Floating-point 2D array texture sampler.

§

ICubemap

Signed cubemap sampler.

§

UICubemap

Unsigned cubemap sampler.

§

Cubemap

Floating-point cubemap sampler.

§

ShaderDataBinding

Shader data binding.

Trait Implementations§

Source§

impl Clone for UniformType

Source§

fn clone(&self) -> UniformType

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for UniformType

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Display for UniformType

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl PartialEq for UniformType

Source§

fn eq(&self, other: &UniformType) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for UniformType

Source§

impl Eq for UniformType

Source§

impl StructuralPartialEq for UniformType

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.