pub unsafe trait VertexLayout: Pod {
const ATTRIBUTES: &'static [VertexAttribute];
}Expand description
Represents vertex values in a vertex buffer object.
§Safety
- The sum of
ATTRIBUTES’s size must be equal tosize_of::<Self>(). - Each
ATTRIBUTES’s offset must be equal tooffset_of!(Self, field), wherefieldis the field represented by the attribute.
Required Associated Constants§
Sourceconst ATTRIBUTES: &'static [VertexAttribute]
const ATTRIBUTES: &'static [VertexAttribute]
The attributes of this layout.
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.