Struct conrod_gfx::Renderer
source · [−]pub struct Renderer<'a, R: Resources> { /* private fields */ }
Expand description
This type is used for translating render::Primitives
into Commands
s that indicate how to
draw the GUI using gfx
.
Implementations
pub fn new<F>(
factory: &mut F,
rtv: &RenderTargetView<R, ColorFormat>,
dpi_factor: f64
) -> Result<Self, RendererCreationError> where
F: Factory<R>,
pub fn new<F>(
factory: &mut F,
rtv: &RenderTargetView<R, ColorFormat>,
dpi_factor: f64
) -> Result<Self, RendererCreationError> where
F: Factory<R>,
Create a new renderer from a gfx::Factory
, gfx::handle::RenderTargetView
and
a given dpi_factor
Produce an Iterator
yielding Command
s.
Fill the inner vertex and command buffers by translating the given primitives
.
Draws using the inner list of Command
s 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.
Call this routine when a window has been resized. This ensures that conrod primitives are
drawn properly with the draw
call.