[−][src]Trait kiss3d::resource::GLPrimitive
Trait implemented by structures that can be uploaded to a uniform or contained by a gpu array.
Required methods
fn gl_type() -> u32
The Opengl primitive type of this structure content.
fn size() -> u32
The number of elements of type self.gl_type()
this structure stores.
fn upload(&self, location: &UniformLocation)
Uploads the element to a gpu location.
Provided methods
fn flatten(array: &[Self]) -> PrimitiveArray
Converts an array of Self
into an array of f32 or i32 primitives.