Struct nannou::ui::backend::glium::Vertex[][src]

pub struct Vertex {
    pub mode: u32,
    pub position: [f32; 2],
    pub tex_coords: [f32; 2],
    pub color: [f32; 4],
}

The Vertex type passed to the vertex shader.

Fields

The mode with which the Vertex will be drawn within the fragment shader.

0 for rendering text. 1 for rendering an image. 2 for rendering non-textured 2D geometry.

If any other value is given, the fragment shader will not output any color.

The position of the vertex within vector space.

[-1.0, -1.0] is the leftmost, bottom position of the display. [1.0, 1.0] is the rightmost, top position of the display.

The coordinates of the texture used by this Vertex.

[0.0, 0.0] is the leftmost, bottom position of the texture. [1.0, 1.0] is the rightmost, top position of the texture.

A color associated with the Vertex.

The way that the color is used depends on the mode.

Trait Implementations

impl Clone for Vertex
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for Vertex
[src]

Formats the value using the given formatter. Read more

impl Vertex for Vertex

Builds the VertexFormat representing the layout of this element.

Returns true if the backend supports this vertex format.

impl Copy for Vertex
[src]

Auto Trait Implementations

impl Send for Vertex

impl Sync for Vertex