pub unsafe trait GLPrimitive: Copy {
    type Element;

    const GLTYPE: u32;

    fn size() -> u32 { ... }
    fn flatten(array: &[Self]) -> &[Self::Element] { ... }
    fn upload(&self, _: &UniformLocation) { ... }
}
Expand description

Trait implemented by structures that can be uploaded to a uniform or contained by a gpu array.

Required Associated Types

The type of the elements of the gpu array.

Required Associated Constants

The Opengl primitive type of this structure content.

Provided Methods

The number of elements of type self.gl_type() this structure stores.

Converts an array of Self into an array of f32 or i32 primitives.

Uploads the element to a gpu location.

Implementations on Foreign Types

Implementors