Struct conrod_core::mesh::Mesh
source · [−]pub struct Mesh { /* private fields */ }
Expand description
A mesh whose vertices may be populated by a list of render primitives.
This is a convenience type for simplifying backend implementations.
Implementations
Construct a Mesh
with the given glyph cache dimensions.
pub fn fill<P, I>(
&mut self,
viewport: Rect,
dpi_factor: f64,
image_map: &Map<I>,
primitives: P
) -> Result<Fill, CacheWriteErr> where
P: PrimitiveWalker,
I: ImageDimensions,
pub fn fill<P, I>(
&mut self,
viewport: Rect,
dpi_factor: f64,
image_map: &Map<I>,
primitives: P
) -> Result<Fill, CacheWriteErr> where
P: PrimitiveWalker,
I: ImageDimensions,
Fill the inner vertex buffer from the given primitives.
viewport
: the window in which the UI is drawn. The width and height should be the physical size (pixels).dpi_factor
: the factor for converting from conrod’s DPI agnostic point space to the pixel space of the viewport.image_map
: a map from image IDs to images.primitives
: the sequence of UI primitives in order of depth to be rendered.
The rusttype glyph cache used for managing caching of glyphs into the pixel buffer.
The CPU-side of the glyph cache, storing all necessary pixel data in a single slice.
Produce an Iterator
yielding Command
s.
These commands describe the order in which unique draw commands and scizzor updates should occur.