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

Draw each vertex as a single point.

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.

Draw a self-connected line segment, where each vertex is connected to the next, and the last vertex connects to the first.

Draw each pair of vertices as individual line segments.

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.

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.

Draw each group of three vertices as a triangle.

Methods

impl DrawingMode
[src]

[src]

Convert from a raw OpenGL integer value to an enum variant. Returns an error if the value is not a valid enum variant.

[src]

Return the OpenGL integer value for a given enum variant.

Trait Implementations

impl Debug for DrawingMode
[src]

[src]

Formats the value using the given formatter. Read more

impl Clone for DrawingMode
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Copy for DrawingMode
[src]

impl PartialEq for DrawingMode
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl Eq for DrawingMode
[src]

impl Hash for DrawingMode
[src]

[src]

Feeds this value into the given [Hasher]. Read more

1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more