[][src]Struct conrod_core::mesh::Mesh

pub struct Mesh { /* fields omitted */ }

A mesh whose vertices may be populated by a list of render primitives.

This is a convenience type for simplifying backend implementations.

Implementations

impl Mesh[src]

pub fn new() -> Self[src]

Construct a new empty Mesh with default glyph cache dimensions.

pub fn with_glyph_cache_dimensions(glyph_cache_dims: [u32; 2]) -> Self[src]

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
[src]

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.

pub fn glyph_cache(&self) -> &GlyphCache<'_>[src]

The rusttype glyph cache used for managing caching of glyphs into the pixel buffer.

pub fn glyph_cache_pixel_buffer(&self) -> &[u8][src]

The CPU-side of the glyph cache, storing all necessary pixel data in a single slice.

pub fn commands(&self) -> Commands<'_>

Notable traits for Commands<'a>

impl<'a> Iterator for Commands<'a> type Item = Command;
[src]

Produce an Iterator yielding Commands.

These commands describe the order in which unique draw commands and scizzor updates should occur.

pub fn vertices(&self) -> &[Vertex][src]

The slice containing all vertices produced by the fill function.

Note that these vertices may be represent geometry across multiple Commands.

Trait Implementations

impl Debug for Mesh[src]

Auto Trait Implementations

impl RefUnwindSafe for Mesh

impl Send for Mesh

impl Sync for Mesh

impl Unpin for Mesh

impl UnwindSafe for Mesh

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.