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
impl Copy for Vertex[src]
Auto Trait Implementations
impl RefUnwindSafe for Vertex
impl Send for Vertex
impl Sync for Vertex
impl Unpin for Vertex
impl UnwindSafe for Vertex
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]pub fn borrow_mut(&mut self) -> &mut T[src]
pub fn borrow_mut(&mut self) -> &mut T[src]Mutably borrows from an owned value. Read more
impl<T> Pointable for T
impl<T> Pointable for Timpl<T> ToOwned for T where
T: Clone, [src]
impl<T> ToOwned for T where
T: Clone, [src]type Owned = T
type Owned = TThe resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn to_owned(&self) -> T[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)[src]
pub fn clone_into(&self, target: &mut T)[src]🔬 This is a nightly-only experimental API. (toowned_clone_into)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<T> Any for T where
T: Any,
T: Any,
impl<T> CloneAny for T where
T: Any + Clone,
T: Any + Clone,
impl<T> DragDropId for T where
T: 'static + Copy + Send, [src]
T: 'static + Copy + Send,