pub struct Info(/* private fields */);
Expand description
Vertex buffer info. This struct is used to describe the shape of the buffer data to be sent to the GPU for rendering.
Implementations§
source§impl Info
impl Info
sourcepub fn add<'this, 'vbo, 'idx, T>(
&'this mut self,
vbo_data: &'vbo [T],
attrib_info: &Info
) -> Result<Slice<'idx>>where
'this: 'idx,
'vbo: 'idx,
pub fn add<'this, 'vbo, 'idx, T>(
&'this mut self,
vbo_data: &'vbo [T],
attrib_info: &Info
) -> Result<Slice<'idx>>where
'this: 'idx,
'vbo: 'idx,
Register vertex buffer object data. The resulting Slice
will have its
lifetime tied to both this Info
and the passed-in VBO. vbo_data
is
assumed to use one T
per drawn primitive, and its layout is assumed to
match the given attrib_info
§Errors
Registering VBO data may fail:
- if
vbo_data
is not allocated with thectru::linear
allocator - if the maximum number (12) of VBOs are already registered