Skip to main content

MeshBufferSlice

Type Alias MeshBufferSlice 

Source
pub type MeshBufferSlice<'a> = SlabAllocationBufferSlice<'a, MeshSlabItem>;
Expand description

The slab buffer and location within that slab in which each mesh is allocated.

Aliased Type§

pub struct MeshBufferSlice<'a> {
    pub buffer: &'a Buffer,
    pub range: Range<u32>,
    /* private fields */
}

Fields§

§buffer: &'a Buffer

The buffer that the data resides in.

§range: Range<u32>

The range of elements within this buffer that the data resides in, measured in elements.

This is an element range, not a byte range. For vertex data, this is measured in increments of a single vertex. (Thus, if a vertex is 32 bytes long, then this range is in units of 32 bytes each.) For index data, this is measured in increments of a single index value (2 or 4 bytes). Draw commands generally take their ranges in elements, not bytes, so this is the most convenient unit in this case.