Struct pixel_widgets::draw::Vertex [−][src]
#[repr(packed)]pub struct Vertex {
pub pos: [f32; 2],
pub uv: [f32; 2],
pub color: [f32; 4],
pub mode: f32,
}Expand description
The Vertex type passed to the vertex shader.
Fields
pos: [f32; 2]The position of the vertex within device coordinates. [-1.0, -1.0] is the left top position of the display.
uv: [f32; 2]The coordinates of the texture used by this Vertex.
[0.0, 0.0] is the left top position of the texture.
color: [f32; 4]A color associated with the Vertex.
The color is multiplied by the end result of the fragment shader.
When mode is not 1, the default value is white ([1.0; 4])
mode: f32The mode with which the Vertex will be drawn within the fragment shader.
0 for rendering an image.
1 for rendering non-textured 2D geometry.
If any other value is given, the fragment shader will not output any color.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Vertex
impl UnwindSafe for Vertex
Blanket Implementations
Mutably borrows from an owned value. Read more