pub struct DrawGeometry {
pub segments: Vec<SegmentInstance>,
pub segments_additive: usize,
pub triangles: Vec<ShapeVertex>,
pub triangles_additive: usize,
}Expand description
The two buffers a frame’s draw layer fills, each partitioned by blend mode. Sized once at preset load.
Additive geometry occupies ..n_additive and over-blended geometry the rest,
which is what lets one buffer and one render pass serve two pipelines — see
the module docs. Producers are appended through push_segment
and push_triangle rather than to the vectors
directly, so the invariant is maintained in one place.
Fields§
§segments: Vec<SegmentInstance>Every line: the waveform, custom waves, shape outlines, borders, motion vectors.
segments_additive: usizeHow many leading entries of segments blend additively.
triangles: Vec<ShapeVertex>Every filled shape’s triangles, as a plain list.
triangles_additive: usizeHow many leading entries of triangles blend
additively. Always a multiple of 3 — a triangle’s three vertices share one
blend mode.
Implementations§
Trait Implementations§
Source§impl Default for DrawGeometry
impl Default for DrawGeometry
Source§fn default() -> DrawGeometry
fn default() -> DrawGeometry
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for DrawGeometry
impl RefUnwindSafe for DrawGeometry
impl Send for DrawGeometry
impl Sync for DrawGeometry
impl Unpin for DrawGeometry
impl UnsafeUnpin for DrawGeometry
impl UnwindSafe for DrawGeometry
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more