Enum wgpu::VertexFormat[][src]

#[repr(C)]pub enum VertexFormat {
    Uchar2,
    Uchar4,
    Char2,
    Char4,
    Uchar2Norm,
    Uchar4Norm,
    Char2Norm,
    Char4Norm,
    Ushort2,
    Ushort4,
    Short2,
    Short4,
    Ushort2Norm,
    Ushort4Norm,
    Short2Norm,
    Short4Norm,
    Half2,
    Half4,
    Float,
    Float2,
    Float3,
    Float4,
    Uint,
    Uint2,
    Uint3,
    Uint4,
    Int,
    Int2,
    Int3,
    Int4,
    Double,
    Double2,
    Double3,
    Double4,
}

Vertex Format for a Vertex Attribute (input).

Variants

Uchar2

Two unsigned bytes (u8). uvec2 in shaders.

Uchar4

Four unsigned bytes (u8). uvec4 in shaders.

Char2

Two signed bytes (i8). ivec2 in shaders.

Char4

Four signed bytes (i8). ivec4 in shaders.

Uchar2Norm

Two unsigned bytes (u8). [0, 255] converted to float [0, 1] vec2 in shaders.

Uchar4Norm

Four unsigned bytes (u8). [0, 255] converted to float [0, 1] vec4 in shaders.

Char2Norm

Two signed bytes (i8). [-127, 127] converted to float [-1, 1] vec2 in shaders.

Char4Norm

Four signed bytes (i8). [-127, 127] converted to float [-1, 1] vec4 in shaders.

Ushort2

Two unsigned shorts (u16). uvec2 in shaders.

Ushort4

Four unsigned shorts (u16). uvec4 in shaders.

Short2

Two signed shorts (i16). ivec2 in shaders.

Short4

Four signed shorts (i16). ivec4 in shaders.

Ushort2Norm

Two unsigned shorts (u16). [0, 65535] converted to float [0, 1] vec2 in shaders.

Ushort4Norm

Four unsigned shorts (u16). [0, 65535] converted to float [0, 1] vec4 in shaders.

Short2Norm

Two signed shorts (i16). [-32767, 32767] converted to float [-1, 1] vec2 in shaders.

Short4Norm

Four signed shorts (i16). [-32767, 32767] converted to float [-1, 1] vec4 in shaders.

Half2

Two half-precision floats (no Rust equiv). vec2 in shaders.

Half4

Four half-precision floats (no Rust equiv). vec4 in shaders.

Float

One single-precision float (f32). float in shaders.

Float2

Two single-precision floats (f32). vec2 in shaders.

Float3

Three single-precision floats (f32). vec3 in shaders.

Float4

Four single-precision floats (f32). vec4 in shaders.

Uint

One unsigned int (u32). uint in shaders.

Uint2

Two unsigned ints (u32). uvec2 in shaders.

Uint3

Three unsigned ints (u32). uvec3 in shaders.

Uint4

Four unsigned ints (u32). uvec4 in shaders.

Int

One signed int (i32). int in shaders.

Int2

Two signed ints (i32). ivec2 in shaders.

Int3

Three signed ints (i32). ivec3 in shaders.

Int4

Four signed ints (i32). ivec4 in shaders.

Double

One double-precision float (f64). double in shaders. Requires VERTEX_ATTRIBUTE_64BIT features.

Double2

Two double-precision floats (f64). dvec2 in shaders. Requires VERTEX_ATTRIBUTE_64BIT features.

Double3

Three double-precision floats (f64). dvec3 in shaders. Requires VERTEX_ATTRIBUTE_64BIT features.

Double4

Four double-precision floats (f64). dvec4 in shaders. Requires VERTEX_ATTRIBUTE_64BIT features.

Implementations

impl VertexFormat[src]

pub const fn size(&self) -> u64[src]

Returns the byte size of the format.

Trait Implementations

impl Clone for VertexFormat[src]

impl Copy for VertexFormat[src]

impl Debug for VertexFormat[src]

impl<'de> Deserialize<'de> for VertexFormat[src]

impl Eq for VertexFormat[src]

impl Hash for VertexFormat[src]

impl PartialEq<VertexFormat> for VertexFormat[src]

impl Serialize for VertexFormat[src]

impl StructuralEq for VertexFormat[src]

impl StructuralPartialEq for VertexFormat[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> CallHasher for T where
    T: Hash

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> Downcast<T> for T

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> Upcast<T> for T