Trait IsVertexAttribute

Source
pub unsafe trait IsVertexAttribute: Pod {
    const FORMAT: VertexFormat;
}
Expand description

Marks the type as acceptable by shader programs as vertex attributes. You shouldn’t implement this manually, as this crate already does that for you.

§Safety

FORMAT::size() == size_of::<Self>().

Required Associated Constants§

Source

const FORMAT: VertexFormat

The associated vertex format of this vertex attribute.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl IsVertexAttribute for f32

Source§

const FORMAT: VertexFormat = VertexFormat::Float32

Source§

impl IsVertexAttribute for f64

Source§

const FORMAT: VertexFormat = VertexFormat::Float64

Source§

impl IsVertexAttribute for i32

Source§

const FORMAT: VertexFormat = VertexFormat::Sint32

Source§

impl IsVertexAttribute for u32

Source§

const FORMAT: VertexFormat = VertexFormat::Uint32

Source§

impl IsVertexAttribute for LinearRgba

Source§

const FORMAT: VertexFormat = VertexFormat::Float32x4

Source§

impl IsVertexAttribute for Vec4

Source§

const FORMAT: VertexFormat = VertexFormat::Float32x4

Source§

impl IsVertexAttribute for Vec2

Source§

const FORMAT: VertexFormat = VertexFormat::Float32x2

Source§

impl IsVertexAttribute for Vec3

Source§

const FORMAT: VertexFormat = VertexFormat::Float32x3

Source§

impl IsVertexAttribute for [f32; 1]

Source§

const FORMAT: VertexFormat = VertexFormat::Float32

Source§

impl IsVertexAttribute for [f32; 2]

Source§

const FORMAT: VertexFormat = VertexFormat::Float32x2

Source§

impl IsVertexAttribute for [f32; 3]

Source§

const FORMAT: VertexFormat = VertexFormat::Float32x3

Source§

impl IsVertexAttribute for [f32; 4]

Source§

const FORMAT: VertexFormat = VertexFormat::Float32x4

Source§

impl IsVertexAttribute for [f64; 1]

Source§

const FORMAT: VertexFormat = VertexFormat::Float64

Source§

impl IsVertexAttribute for [f64; 2]

Source§

const FORMAT: VertexFormat = VertexFormat::Float64x2

Source§

impl IsVertexAttribute for [f64; 3]

Source§

const FORMAT: VertexFormat = VertexFormat::Float64x3

Source§

impl IsVertexAttribute for [f64; 4]

Source§

const FORMAT: VertexFormat = VertexFormat::Float64x4

Source§

impl IsVertexAttribute for [i8; 2]

Source§

const FORMAT: VertexFormat = VertexFormat::Sint8x2

Source§

impl IsVertexAttribute for [i8; 4]

Source§

const FORMAT: VertexFormat = VertexFormat::Sint8x4

Source§

impl IsVertexAttribute for [i16; 2]

Source§

const FORMAT: VertexFormat = VertexFormat::Sint16x2

Source§

impl IsVertexAttribute for [i16; 4]

Source§

const FORMAT: VertexFormat = VertexFormat::Sint16x4

Source§

impl IsVertexAttribute for [i32; 1]

Source§

const FORMAT: VertexFormat = VertexFormat::Sint32

Source§

impl IsVertexAttribute for [i32; 2]

Source§

const FORMAT: VertexFormat = VertexFormat::Sint32x2

Source§

impl IsVertexAttribute for [i32; 3]

Source§

const FORMAT: VertexFormat = VertexFormat::Sint32x3

Source§

impl IsVertexAttribute for [i32; 4]

Source§

const FORMAT: VertexFormat = VertexFormat::Sint32x4

Source§

impl IsVertexAttribute for [u8; 2]

Source§

const FORMAT: VertexFormat = VertexFormat::Uint8x2

Source§

impl IsVertexAttribute for [u8; 4]

Source§

const FORMAT: VertexFormat = VertexFormat::Uint8x4

Source§

impl IsVertexAttribute for [u16; 2]

Source§

const FORMAT: VertexFormat = VertexFormat::Uint16x2

Source§

impl IsVertexAttribute for [u16; 4]

Source§

const FORMAT: VertexFormat = VertexFormat::Uint16x4

Source§

impl IsVertexAttribute for [u32; 1]

Source§

const FORMAT: VertexFormat = VertexFormat::Uint32

Source§

impl IsVertexAttribute for [u32; 2]

Source§

const FORMAT: VertexFormat = VertexFormat::Uint32x2

Source§

impl IsVertexAttribute for [u32; 3]

Source§

const FORMAT: VertexFormat = VertexFormat::Uint32x3

Source§

impl IsVertexAttribute for [u32; 4]

Source§

const FORMAT: VertexFormat = VertexFormat::Uint32x4

Source§

impl IsVertexAttribute for [Nor<i8>; 2]

Source§

const FORMAT: VertexFormat = VertexFormat::Snorm8x2

Source§

impl IsVertexAttribute for [Nor<i8>; 4]

Source§

const FORMAT: VertexFormat = VertexFormat::Snorm8x4

Source§

impl IsVertexAttribute for [Nor<i16>; 2]

Source§

const FORMAT: VertexFormat = VertexFormat::Snorm16x2

Source§

impl IsVertexAttribute for [Nor<i16>; 4]

Source§

const FORMAT: VertexFormat = VertexFormat::Snorm16x4

Source§

impl IsVertexAttribute for [Nor<u8>; 2]

Source§

const FORMAT: VertexFormat = VertexFormat::Unorm8x2

Source§

impl IsVertexAttribute for [Nor<u8>; 4]

Source§

const FORMAT: VertexFormat = VertexFormat::Unorm8x4

Source§

impl IsVertexAttribute for [Nor<u16>; 2]

Source§

const FORMAT: VertexFormat = VertexFormat::Unorm16x2

Source§

impl IsVertexAttribute for [Nor<u16>; 4]

Source§

const FORMAT: VertexFormat = VertexFormat::Unorm16x4

Implementors§