[][src]Function conrod_piston::draw::primitives

pub fn primitives<'a, P, G, T, Img, C, F>(
    primitives: P,
    context: Context,
    graphics: &'a mut G,
    text_texture_cache: &'a mut T,
    glyph_cache: &'a mut GlyphCache,
    image_map: &'a Map<Img>,
    cache_queued_glyphs: C,
    texture_from_image: F
) where
    P: PrimitiveWalker,
    G: Graphics<Texture = T>,
    T: ImageSize,
    C: FnMut(&mut G, &mut T, Rect<u32>, &[u8]),
    F: FnMut(&Img) -> &T, 

Render the given sequence of conrod primitive widgets.

Params:

  • primitives - The sequence of primitives to be rendered to the screen.
  • context - The piston2d-graphics drawing context.
  • graphics - The piston Graphics backend.
  • text_texture_cache - Some texture type T upon which we can cache text glyphs.
  • glyph_cache - The RustType Cache used to cache glyphs in our text_texture_cache.
  • image_map - Mappings from image widget indices to their associated image data.
  • cache_queue_glyphs - A function for caching glyphs within the given texture cache.
  • texture_from_image - A function that borrows a drawable texture T from an Img. In many cases, Img may be the same type as T, however we provide this to allow for flexibility.