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
mode: u32
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.
position: [f32; 2]
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.
tex_coords: [f32; 2]
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.
color: [f32; 4]
A color associated with the Vertex
.
The way that the color is used depends on the mode
.
Trait Implementations
impl Clone for Vertex
[src]
impl Clone for Vertex
fn clone(&self) -> Vertex
[src]
fn clone(&self) -> Vertex
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Debug for Vertex
[src]
impl Debug for Vertex
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
[src]
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
Formats the value using the given formatter. Read more
impl Vertex for Vertex
impl Vertex for Vertex
fn build_bindings(
) -> Cow<'static, [(Cow<'static, str>, usize, AttributeType, bool)]>
fn build_bindings(
) -> Cow<'static, [(Cow<'static, str>, usize, AttributeType, bool)]>
Builds the VertexFormat
representing the layout of this element.
fn is_supported<C>(caps: &C) -> bool where
C: CapabilitiesSource + ?Sized,
[src]
fn is_supported<C>(caps: &C) -> bool where
C: CapabilitiesSource + ?Sized,
Returns true if the backend supports this vertex format.
impl Copy for Vertex
[src]
impl Copy for Vertex