pub struct Info(/* private fields */);
Expand description
Vertex attribute info. This struct describes how vertex buffers are layed out and used (i.e. the shape of the vertex data).
Implementations§
source§impl Info
impl Info
sourcepub fn add_loader(
&mut self,
register: Register,
format: Format,
count: u8
) -> Result<Index>
pub fn add_loader( &mut self, register: Register, format: Format, count: u8 ) -> Result<Index>
Add an attribute loader to the attribute info. The resulting attribute index indicates the registration order of the attributes.
§Parameters
register
: the shader program input register for this attribute.format
: the data format of this attribute.count
: the number of elements in each attribute (up to 4, corresponding toxyzw
/rgba
/stpq
).
§Errors
- If
count > 4
- If this attribute info already has the maximum number of attributes.
sourcepub fn attr_count(&self) -> c_int
pub fn attr_count(&self) -> c_int
Get the number of registered attributes.