Enum glitter::types::DrawingMode
[−]
[src]
pub enum DrawingMode { Points, LineStrip, LineLoop, Lines, TriangleStrip, TriangleFan, Triangles, }
The primitive drawing modes for drawing raw vertex data.
Variants
Points
Draw each vertex as a single point.
LineStrip
Draw a connected line segment, where each vertex is connected to the next. The first and last vertex are treated as the start and end points.
LineLoop
Draw a self-connected line segment, where each vertex is connected to the next, and the last vertex connects to the first.
Lines
Draw each pair of vertices as individual line segments.
TriangleStrip
Draw the vertices as a strip of triangles. The first three vertices form the first triangle, then the next vertex plus the previous two vertices form the next triangle, and so on. For example, vertices v1, v2, and v3 form the first triangle, then vertices v2, v3, and v4 form the next, and so on.
TriangleFan
Draw the vertices as a triangle fan. The first vertex, v1 is the fan's 'center'. Vertices v2 and v3 form the first triangle with the center, v1. Then vertices v3, v4, and v1 form the next triangle, then vertices v4, v5, and v1, and so on.
Triangles
Draw each group of three vertices as a triangle.
Methods
impl DrawingMode
[src]
pub fn from_gl(gl_enum: GLenum) -> Result<Self, ()>
[src]
Convert from a raw OpenGL integer value to an enum variant. Returns an error if the value is not a valid enum variant.
pub fn gl_enum(&self) -> GLenum
[src]
Return the OpenGL integer value for a given enum variant.
Trait Implementations
impl Debug for DrawingMode
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Clone for DrawingMode
[src]
fn clone(&self) -> DrawingMode
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Copy for DrawingMode
[src]
impl PartialEq for DrawingMode
[src]
fn eq(&self, __arg_0: &DrawingMode) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.