[][src]Struct conrod_glium::Renderer

pub struct Renderer { /* fields omitted */ }
[]

A type used for translating render::Primitives into Commands that indicate how to draw the conrod GUI using glium.

Implementations

impl Renderer[src][]

pub fn new<F>(facade: &F) -> Result<Self, RendererCreationError> where
    F: Facade
[src][]

Construct a new empty Renderer.

The dimensions of the inner glyph cache will be equal to the dimensions of the given facade's framebuffer.

pub fn with_glyph_cache_dimensions<F>(
    facade: &F,
    width: u32,
    height: u32
) -> Result<Self, RendererCreationError> where
    F: Facade
[src][]

Construct a new empty Renderer with the given glyph cache dimensions.

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

Notable traits for Commands<'a>

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

Produce an Iterator yielding Commands.

pub fn fill<D, P, T>(&mut self, display: &D, primitives: P, image_map: &Map<T>) where
    P: PrimitiveWalker,
    D: Display,
    T: TextureDimensions
[src][]

Fill the inner vertex and command buffers by translating the given primitives.

pub fn draw<F, S, T>(
    &self,
    facade: &F,
    surface: &mut S,
    image_map: &Map<T>
) -> Result<(), DrawError> where
    F: Facade,
    S: Surface,
    Sampler<'a, T>: AsUniformValue
[src][]

Draws using the inner list of Commands to the given display.

Note: If you require more granular control over rendering, you may want to use the fill and commands methods separately. This method is simply a convenience wrapper around those methods for the case that the user does not require accessing or modifying conrod's draw parameters, uniforms or generated draw commands.

Auto Trait Implementations

impl !RefUnwindSafe for Renderer

impl !Send for Renderer

impl !Sync for Renderer

impl Unpin for Renderer

impl !UnwindSafe for Renderer

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.