pub enum UniformValue<'a> {
Show 96 variants Block(BufferAnySlice<'a>, fn(_: &UniformBlock) -> Result<(), LayoutMismatchError>), Subroutine(ShaderStage, &'a str), SignedInt(i32), UnsignedInt(u32), Float(f32), Mat2([[f32; 2]; 2]), Mat3([[f32; 3]; 3]), Mat4([[f32; 4]; 4]), Vec2([f32; 2]), Vec3([f32; 3]), Vec4([f32; 4]), IntVec2([i32; 2]), IntVec3([i32; 3]), IntVec4([i32; 4]), UnsignedIntVec2([u32; 2]), UnsignedIntVec3([u32; 3]), UnsignedIntVec4([u32; 4]), Bool(bool), BoolVec2([bool; 2]), BoolVec3([bool; 3]), BoolVec4([bool; 4]), Double(f64), DoubleVec2([f64; 2]), DoubleVec3([f64; 3]), DoubleVec4([f64; 4]), DoubleMat2([[f64; 2]; 2]), DoubleMat3([[f64; 3]; 3]), DoubleMat4([[f64; 4]; 4]), Int64(i64), Int64Vec2([i64; 2]), Int64Vec3([i64; 3]), Int64Vec4([i64; 4]), UnsignedInt64(u64), UnsignedInt64Vec2([u64; 2]), UnsignedInt64Vec3([u64; 3]), UnsignedInt64Vec4([u64; 4]), Texture1d(&'a Texture1dOption<SamplerBehavior>), CompressedTexture1d(&'a CompressedTexture1dOption<SamplerBehavior>), SrgbTexture1d(&'a SrgbTexture1dOption<SamplerBehavior>), CompressedSrgbTexture1d(&'a CompressedSrgbTexture1dOption<SamplerBehavior>), IntegralTexture1d(&'a IntegralTexture1dOption<SamplerBehavior>), UnsignedTexture1d(&'a UnsignedTexture1dOption<SamplerBehavior>), DepthTexture1d(&'a DepthTexture1dOption<SamplerBehavior>), Texture2d(&'a Texture2dOption<SamplerBehavior>), CompressedTexture2d(&'a CompressedTexture2dOption<SamplerBehavior>), SrgbTexture2d(&'a SrgbTexture2dOption<SamplerBehavior>), CompressedSrgbTexture2d(&'a CompressedSrgbTexture2dOption<SamplerBehavior>), IntegralTexture2d(&'a IntegralTexture2dOption<SamplerBehavior>), UnsignedTexture2d(&'a UnsignedTexture2dOption<SamplerBehavior>), DepthTexture2d(&'a DepthTexture2dOption<SamplerBehavior>), Texture2dMultisample(&'a Texture2dMultisampleOption<SamplerBehavior>), SrgbTexture2dMultisample(&'a SrgbTexture2dMultisampleOption<SamplerBehavior>), IntegralTexture2dMultisample(&'a IntegralTexture2dMultisampleOption<SamplerBehavior>), UnsignedTexture2dMultisample(&'a UnsignedTexture2dMultisampleOption<SamplerBehavior>), DepthTexture2dMultisample(&'a DepthTexture2dMultisampleOption<SamplerBehavior>), Texture3d(&'a Texture3dOption<SamplerBehavior>), CompressedTexture3d(&'a CompressedTexture3dOption<SamplerBehavior>), SrgbTexture3d(&'a SrgbTexture3dOption<SamplerBehavior>), CompressedSrgbTexture3d(&'a CompressedSrgbTexture3dOption<SamplerBehavior>), IntegralTexture3d(&'a IntegralTexture3dOption<SamplerBehavior>), UnsignedTexture3d(&'a UnsignedTexture3dOption<SamplerBehavior>), DepthTexture3d(&'a DepthTexture3dOption<SamplerBehavior>), Texture1dArray(&'a Texture1dArrayOption<SamplerBehavior>), CompressedTexture1dArray(&'a CompressedTexture1dArrayOption<SamplerBehavior>), SrgbTexture1dArray(&'a SrgbTexture1dArrayOption<SamplerBehavior>), CompressedSrgbTexture1dArray(&'a CompressedSrgbTexture1dArrayOption<SamplerBehavior>), IntegralTexture1dArray(&'a IntegralTexture1dArrayOption<SamplerBehavior>), UnsignedTexture1dArray(&'a UnsignedTexture1dArrayOption<SamplerBehavior>), DepthTexture1dArray(&'a DepthTexture1dArrayOption<SamplerBehavior>), Texture2dArray(&'a Texture2dArrayOption<SamplerBehavior>), CompressedTexture2dArray(&'a CompressedTexture2dArrayOption<SamplerBehavior>), SrgbTexture2dArray(&'a SrgbTexture2dArrayOption<SamplerBehavior>), CompressedSrgbTexture2dArray(&'a CompressedSrgbTexture2dArrayOption<SamplerBehavior>), IntegralTexture2dArray(&'a IntegralTexture2dArrayOption<SamplerBehavior>), UnsignedTexture2dArray(&'a UnsignedTexture2dArrayOption<SamplerBehavior>), DepthTexture2dArray(&'a DepthTexture2dArrayOption<SamplerBehavior>), Texture2dMultisampleArray(&'a Texture2dMultisampleArrayOption<SamplerBehavior>), SrgbTexture2dMultisampleArray(&'a SrgbTexture2dMultisampleArrayOption<SamplerBehavior>), IntegralTexture2dMultisampleArray(&'a IntegralTexture2dMultisampleArrayOption<SamplerBehavior>), UnsignedTexture2dMultisampleArray(&'a UnsignedTexture2dMultisampleArrayOption<SamplerBehavior>), DepthTexture2dMultisampleArray(&'a DepthTexture2dMultisampleArrayOption<SamplerBehavior>), Cubemap(&'a CubemapOption<SamplerBehavior>), CompressedCubemap(&'a CompressedCubemapOption<SamplerBehavior>), SrgbCubemap(&'a SrgbCubemapOption<SamplerBehavior>), CompressedSrgbCubemap(&'a CompressedSrgbCubemapOption<SamplerBehavior>), IntegralCubemap(&'a IntegralCubemapOption<SamplerBehavior>), UnsignedCubemap(&'a UnsignedCubemapOption<SamplerBehavior>), DepthCubemap(&'a DepthCubemapOption<SamplerBehavior>), CubemapArray(&'a CubemapArrayOption<SamplerBehavior>), CompressedCubemapArray(&'a CompressedCubemapArrayOption<SamplerBehavior>), SrgbCubemapArray(&'a SrgbCubemapArrayOption<SamplerBehavior>), CompressedSrgbCubemapArray(&'a CompressedSrgbCubemapArrayOption<SamplerBehavior>), IntegralCubemapArray(&'a IntegralCubemapArrayOption<SamplerBehavior>), UnsignedCubemapArray(&'a UnsignedCubemapArrayOption<SamplerBehavior>), DepthCubemapArray(&'a DepthCubemapArrayOption<SamplerBehavior>), BufferTexture(BufferTextureRef<'a>),
}
Expand description

Represents a value to bind to a uniform.

Variants§

§

Block(BufferAnySlice<'a>, fn(_: &UniformBlock) -> Result<(), LayoutMismatchError>)

Contains a handle to the buffer, and a function that indicates whether this buffer can be bound on a block with the given layout. The last parameter is a sender which must be used to send a SyncFence that expires when the buffer has finished being used.

§

Subroutine(ShaderStage, &'a str)

§

SignedInt(i32)

§

UnsignedInt(u32)

§

Float(f32)

§

Mat2([[f32; 2]; 2])

2x2 column-major matrix.

§

Mat3([[f32; 3]; 3])

3x3 column-major matrix.

§

Mat4([[f32; 4]; 4])

4x4 column-major matrix.

§

Vec2([f32; 2])

§

Vec3([f32; 3])

§

Vec4([f32; 4])

§

IntVec2([i32; 2])

§

IntVec3([i32; 3])

§

IntVec4([i32; 4])

§

UnsignedIntVec2([u32; 2])

§

UnsignedIntVec3([u32; 3])

§

UnsignedIntVec4([u32; 4])

§

Bool(bool)

§

BoolVec2([bool; 2])

§

BoolVec3([bool; 3])

§

BoolVec4([bool; 4])

§

Double(f64)

§

DoubleVec2([f64; 2])

§

DoubleVec3([f64; 3])

§

DoubleVec4([f64; 4])

§

DoubleMat2([[f64; 2]; 2])

§

DoubleMat3([[f64; 3]; 3])

§

DoubleMat4([[f64; 4]; 4])

§

Int64(i64)

§

Int64Vec2([i64; 2])

§

Int64Vec3([i64; 3])

§

Int64Vec4([i64; 4])

§

UnsignedInt64(u64)

§

UnsignedInt64Vec2([u64; 2])

§

UnsignedInt64Vec3([u64; 3])

§

UnsignedInt64Vec4([u64; 4])

§

Texture1d(&'a Texture1dOption<SamplerBehavior>)

§

CompressedTexture1d(&'a CompressedTexture1dOption<SamplerBehavior>)

§

SrgbTexture1d(&'a SrgbTexture1dOption<SamplerBehavior>)

§

CompressedSrgbTexture1d(&'a CompressedSrgbTexture1dOption<SamplerBehavior>)

§

IntegralTexture1d(&'a IntegralTexture1dOption<SamplerBehavior>)

§

UnsignedTexture1d(&'a UnsignedTexture1dOption<SamplerBehavior>)

§

DepthTexture1d(&'a DepthTexture1dOption<SamplerBehavior>)

§

Texture2d(&'a Texture2dOption<SamplerBehavior>)

§

CompressedTexture2d(&'a CompressedTexture2dOption<SamplerBehavior>)

§

SrgbTexture2d(&'a SrgbTexture2dOption<SamplerBehavior>)

§

CompressedSrgbTexture2d(&'a CompressedSrgbTexture2dOption<SamplerBehavior>)

§

IntegralTexture2d(&'a IntegralTexture2dOption<SamplerBehavior>)

§

UnsignedTexture2d(&'a UnsignedTexture2dOption<SamplerBehavior>)

§

DepthTexture2d(&'a DepthTexture2dOption<SamplerBehavior>)

§

Texture2dMultisample(&'a Texture2dMultisampleOption<SamplerBehavior>)

§

SrgbTexture2dMultisample(&'a SrgbTexture2dMultisampleOption<SamplerBehavior>)

§

IntegralTexture2dMultisample(&'a IntegralTexture2dMultisampleOption<SamplerBehavior>)

§

UnsignedTexture2dMultisample(&'a UnsignedTexture2dMultisampleOption<SamplerBehavior>)

§

DepthTexture2dMultisample(&'a DepthTexture2dMultisampleOption<SamplerBehavior>)

§

Texture3d(&'a Texture3dOption<SamplerBehavior>)

§

CompressedTexture3d(&'a CompressedTexture3dOption<SamplerBehavior>)

§

SrgbTexture3d(&'a SrgbTexture3dOption<SamplerBehavior>)

§

CompressedSrgbTexture3d(&'a CompressedSrgbTexture3dOption<SamplerBehavior>)

§

IntegralTexture3d(&'a IntegralTexture3dOption<SamplerBehavior>)

§

UnsignedTexture3d(&'a UnsignedTexture3dOption<SamplerBehavior>)

§

DepthTexture3d(&'a DepthTexture3dOption<SamplerBehavior>)

§

Texture1dArray(&'a Texture1dArrayOption<SamplerBehavior>)

§

CompressedTexture1dArray(&'a CompressedTexture1dArrayOption<SamplerBehavior>)

§

SrgbTexture1dArray(&'a SrgbTexture1dArrayOption<SamplerBehavior>)

§

CompressedSrgbTexture1dArray(&'a CompressedSrgbTexture1dArrayOption<SamplerBehavior>)

§

IntegralTexture1dArray(&'a IntegralTexture1dArrayOption<SamplerBehavior>)

§

UnsignedTexture1dArray(&'a UnsignedTexture1dArrayOption<SamplerBehavior>)

§

DepthTexture1dArray(&'a DepthTexture1dArrayOption<SamplerBehavior>)

§

Texture2dArray(&'a Texture2dArrayOption<SamplerBehavior>)

§

CompressedTexture2dArray(&'a CompressedTexture2dArrayOption<SamplerBehavior>)

§

SrgbTexture2dArray(&'a SrgbTexture2dArrayOption<SamplerBehavior>)

§

CompressedSrgbTexture2dArray(&'a CompressedSrgbTexture2dArrayOption<SamplerBehavior>)

§

IntegralTexture2dArray(&'a IntegralTexture2dArrayOption<SamplerBehavior>)

§

UnsignedTexture2dArray(&'a UnsignedTexture2dArrayOption<SamplerBehavior>)

§

DepthTexture2dArray(&'a DepthTexture2dArrayOption<SamplerBehavior>)

§

Texture2dMultisampleArray(&'a Texture2dMultisampleArrayOption<SamplerBehavior>)

§

SrgbTexture2dMultisampleArray(&'a SrgbTexture2dMultisampleArrayOption<SamplerBehavior>)

§

IntegralTexture2dMultisampleArray(&'a IntegralTexture2dMultisampleArrayOption<SamplerBehavior>)

§

UnsignedTexture2dMultisampleArray(&'a UnsignedTexture2dMultisampleArrayOption<SamplerBehavior>)

§

DepthTexture2dMultisampleArray(&'a DepthTexture2dMultisampleArrayOption<SamplerBehavior>)

§

Cubemap(&'a CubemapOption<SamplerBehavior>)

§

CompressedCubemap(&'a CompressedCubemapOption<SamplerBehavior>)

§

SrgbCubemap(&'a SrgbCubemapOption<SamplerBehavior>)

§

CompressedSrgbCubemap(&'a CompressedSrgbCubemapOption<SamplerBehavior>)

§

IntegralCubemap(&'a IntegralCubemapOption<SamplerBehavior>)

§

UnsignedCubemap(&'a UnsignedCubemapOption<SamplerBehavior>)

§

DepthCubemap(&'a DepthCubemapOption<SamplerBehavior>)

§

CubemapArray(&'a CubemapArrayOption<SamplerBehavior>)

§

CompressedCubemapArray(&'a CompressedCubemapArrayOption<SamplerBehavior>)

§

SrgbCubemapArray(&'a SrgbCubemapArrayOption<SamplerBehavior>)

§

CompressedSrgbCubemapArray(&'a CompressedSrgbCubemapArrayOption<SamplerBehavior>)

§

IntegralCubemapArray(&'a IntegralCubemapArrayOption<SamplerBehavior>)

§

UnsignedCubemapArray(&'a UnsignedCubemapArrayOption<SamplerBehavior>)

§

DepthCubemapArray(&'a DepthCubemapArrayOption<SamplerBehavior>)

§

BufferTexture(BufferTextureRef<'a>)

Implementations§

Returns true if this value can be used with a uniform of the given type.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
A type that holds a sized version of the content.
Prepares an output buffer, then turns this buffer into an Owned.
Returns the size of each element.
Produces a pointer to the data.
Builds a pointer to this type from a raw pointer.
Returns true if the size is suitable to store a type like this.

Returns the argument unchanged.

Calls U::from(self).

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

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.