Enum glium::uniforms::UniformValue [] [src]

pub enum UniformValue<'a> {
    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>),
}
[]

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 binded 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>)

Methods

impl<'a> UniformValue<'a>
[src]

fn is_usable_with(&self, ty: &UniformType) -> bool[]

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

Trait Implementations

impl<'a> Copy for UniformValue<'a>
[src]

impl<'a> Clone for UniformValue<'a>
[src]

fn clone(&self) -> UniformValue<'a>[]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)
1.0.0
[]

Performs copy-assignment from source. Read more