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_datais not allocated with thectru::linearallocator - if the maximum number (12) of VBOs are already registered