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§
Source§impl Mesh
impl Mesh
Sourcepub fn with_glyph_cache_dimensions(glyph_cache_dims: [u32; 2]) -> Self
pub fn with_glyph_cache_dimensions(glyph_cache_dims: [u32; 2]) -> Self
Construct a Mesh
with the given glyph cache dimensions.
Sourcepub 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.
Sourcepub fn glyph_cache(&self) -> &GlyphCache<'_>
pub fn glyph_cache(&self) -> &GlyphCache<'_>
The rusttype glyph cache used for managing caching of glyphs into the pixel buffer.
Sourcepub fn glyph_cache_pixel_buffer(&self) -> &[u8] ⓘ
pub fn glyph_cache_pixel_buffer(&self) -> &[u8] ⓘ
The CPU-side of the glyph cache, storing all necessary pixel data in a single slice.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Mesh
impl RefUnwindSafe for Mesh
impl Send for Mesh
impl Sync for Mesh
impl Unpin for Mesh
impl UnwindSafe for Mesh
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