Skip to main content

VertexFormat

Enum VertexFormat 

Source
#[repr(C)]
pub enum VertexFormat {
Show 30 variants Uchar2 = 0, Uchar4 = 1, Char2 = 2, Char4 = 3, Uchar2Norm = 4, Uchar4Norm = 5, Char2Norm = 6, Char4Norm = 7, Ushort2 = 8, Ushort4 = 9, Short2 = 10, Short4 = 11, Ushort2Norm = 12, Ushort4Norm = 13, Short2Norm = 14, Short4Norm = 15, Half2 = 16, Half4 = 17, Float = 18, Float2 = 19, Float3 = 20, Float4 = 21, Uint = 22, Uint2 = 23, Uint3 = 24, Uint4 = 25, Int = 26, Int2 = 27, Int3 = 28, Int4 = 29,
}
Expand description

Vertex Format for a Vertex Attribute (input).

Variants§

§

Uchar2 = 0

Two unsigned bytes (u8). uvec2 in shaders.

§

Uchar4 = 1

Four unsigned bytes (u8). uvec4 in shaders.

§

Char2 = 2

Two signed bytes (i8). ivec2 in shaders.

§

Char4 = 3

Four signed bytes (i8). ivec4 in shaders.

§

Uchar2Norm = 4

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

§

Uchar4Norm = 5

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

§

Char2Norm = 6

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

§

Char4Norm = 7

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

§

Ushort2 = 8

Two unsigned shorts (u16). uvec2 in shaders.

§

Ushort4 = 9

Four unsigned shorts (u16). uvec4 in shaders.

§

Short2 = 10

Two unsigned shorts (i16). ivec2 in shaders.

§

Short4 = 11

Four unsigned shorts (i16). ivec4 in shaders.

§

Ushort2Norm = 12

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

§

Ushort4Norm = 13

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

§

Short2Norm = 14

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

§

Short4Norm = 15

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

§

Half2 = 16

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

§

Half4 = 17

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

§

Float = 18

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

§

Float2 = 19

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

§

Float3 = 20

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

§

Float4 = 21

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

§

Uint = 22

One unsigned int (u32). uint in shaders.

§

Uint2 = 23

Two unsigned ints (u32). uvec2 in shaders.

§

Uint3 = 24

Three unsigned ints (u32). uvec3 in shaders.

§

Uint4 = 25

Four unsigned ints (u32). uvec4 in shaders.

§

Int = 26

One signed int (i32). int in shaders.

§

Int2 = 27

Two signed ints (i32). ivec2 in shaders.

§

Int3 = 28

Three signed ints (i32). ivec3 in shaders.

§

Int4 = 29

Four signed ints (i32). ivec4 in shaders.

Trait Implementations§

Source§

impl Clone for VertexFormat

Source§

fn clone(&self) -> VertexFormat

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Copy for VertexFormat

Source§

impl Debug for VertexFormat

Source§

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

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

impl<'de> Deserialize<'de> for VertexFormat

Source§

fn deserialize<__D>( __deserializer: __D, ) -> Result<VertexFormat, <__D as Deserializer<'de>>::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for VertexFormat

Source§

impl Hash for VertexFormat

Source§

fn hash<__H>(&self, state: &mut __H)
where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for VertexFormat

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · 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 Serialize for VertexFormat

Source§

fn serialize<__S>( &self, __serializer: __S, ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for VertexFormat

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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

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, 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.