Trait glitter::uniform_data::UniformData [] [src]

pub trait UniformData {
    fn uniform_datum_type() -> UniformDatumType;
    fn uniform_bytes(&self) -> &[u8];
    fn uniform_elements(&self) -> usize;
}

A type that can be set to a uniform value in a program object, using the gl.set_uniform method. A UniformData type can be composed of one or more UniformDatums, and this is likely the type that user types will implement.

Required Methods

fn uniform_datum_type() -> UniformDatumType

Return the type that this uniform data should be treated as.

fn uniform_bytes(&self) -> &[u8]

Create a byte slice of uniform data from self.

fn uniform_elements(&self) -> usize

Return the number of uniform data elements that self contains.

Implementors