Enum gfx::SliceKind
[−]
[src]
pub enum SliceKind<R: Resources> { Vertex, Index8(Buffer<R, u8>, VertexCount), Index16(Buffer<R, u16>, VertexCount), Index32(Buffer<R, u32>, VertexCount), }
Source of vertex ordering for a slice
Variants
VertexRender vertex data directly from the Mesh's buffer.
Index8(Buffer<R, u8>, VertexCount)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(Buffer<R, u16>, VertexCount)As Index8 but with u16 indices
Index32(Buffer<R, u32>, VertexCount)As Index8 but with u32 indices
Trait Implementations
impl<R: PartialEq + Resources> PartialEq for SliceKind<R>[src]
fn eq(&self, __arg_0: &SliceKind<R>) -> bool
This method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, __arg_0: &SliceKind<R>) -> bool
This method tests for !=.
impl<R: Debug + Resources> Debug for SliceKind<R>[src]
impl<R: Clone + Resources> Clone for SliceKind<R>[src]
fn clone(&self) -> SliceKind<R>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0
Performs copy-assignment from source. Read more