Trait glitter::vertex_data::VertexPrimitive [] [src]

pub unsafe trait VertexPrimitive: Copy {
    fn data_type() -> DataType;
}

A single, basic value that can be composed to make a VertexDatum. Scalar values are an example of a VertexPrimitive.

Safety

This type will be transmuted to a slice according to the value returned by the data_type method. Implementing this method incorrectly will lead to memory unsafety.

Required Methods

Return the data type this primitive corresponds to.

Safety

An instance of this type must be the size of the DataType returned by this function.

Implementations on Foreign Types

impl VertexPrimitive for i8
[src]

impl VertexPrimitive for u8
[src]

impl VertexPrimitive for i16
[src]

impl VertexPrimitive for u16
[src]

impl VertexPrimitive for f32
[src]

Implementors