pub enum VertexMode {
Triangles,
TriangleStrip,
TriangleFan,
}Expand description
How positions are grouped into triangles.
The two compact forms exist because a strip or a fan states a triangle in one vertex where a list states it in three, and a caller who has that shape already should not have to expand it. They are expanded here rather than carried to a backend, since the difference is an index buffer and both backends draw indexed triangles.
Variants§
Triangles
Every three positions are one triangle.
TriangleStrip
Each position after the second closes a triangle with the two before it, alternating winding so the strip is consistently wound.
TriangleFan
Each position after the second closes a triangle with the first and the one before it.
Trait Implementations§
Source§impl Clone for VertexMode
impl Clone for VertexMode
Source§fn clone(&self) -> VertexMode
fn clone(&self) -> VertexMode
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for VertexMode
Source§impl Debug for VertexMode
impl Debug for VertexMode
Source§impl Default for VertexMode
impl Default for VertexMode
Source§fn default() -> VertexMode
fn default() -> VertexMode
Returns the “default value” for a type. Read more
impl Eq for VertexMode
Source§impl PartialEq for VertexMode
impl PartialEq for VertexMode
impl StructuralPartialEq for VertexMode
Auto Trait Implementations§
impl Freeze for VertexMode
impl RefUnwindSafe for VertexMode
impl Send for VertexMode
impl Sync for VertexMode
impl Unpin for VertexMode
impl UnsafeUnpin for VertexMode
impl UnwindSafe for VertexMode
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more