pub enum SliceKind<R: Resources> {
Vertex,
Index8(IndexBuffer<R, u8>, VertexCount),
Index16(IndexBuffer<R, u16>, VertexCount),
Index32(IndexBuffer<R, u32>, VertexCount),
}
Source of vertex ordering for a slice
Variants
Vertex | Render vertex data directly from the Mesh 's buffer.
|
Index8 | The Index* buffer contains a list of indices into the Mesh
data, so every vertex attribute does not need to be duplicated, only
its position in the Mesh . The base index is added to this index
before fetching the vertex from the buffer. For example, when drawing
a square, two triangles are needed. Using only Vertex , one
would need 6 separate vertices, 3 for each triangle. However, two of
the vertices will be identical, wasting space for the duplicated
attributes. Instead, the Mesh can store 4 vertices and an
Index8 can be used instead.
|
Index16 | As Index8 but with u16 indices
|
Index32 | As Index8 but with u32 indices
|
Trait Implementations
Derived Implementations
Keyboard shortcuts
- ?
- Show this help dialog
- S
- Focus the search field
- ⇤
- Move up in search results
- ⇥
- Move down in search results
- ⏎
- Go to active search result
Search tricks
Prefix searches with a type followed by a colon (e.g.
fn:
) to restrict the search to a given type.
Accepted types are: fn
, mod
,
struct
, enum
,
trait
, typedef
(or
tdef
).
Search functions by type signature (e.g.
vec -> usize
)