Struct conrod_glium::Renderer
source · pub struct Renderer { /* private fields */ }
Expand description
A type used for translating render::Primitives
into Command
s that indicate how to draw the
conrod GUI using glium
.
Implementations
sourceimpl Renderer
impl Renderer
sourcepub fn new<F>(facade: &F) -> Result<Self, RendererCreationError>where
F: Facade,
pub fn new<F>(facade: &F) -> Result<Self, RendererCreationError>where
F: Facade,
Construct a new empty Renderer
.
The dimensions of the inner glyph cache will be equal to the dimensions of the given facade’s framebuffer.
sourcepub fn with_glyph_cache_dimensions<F>(
facade: &F,
width: u32,
height: u32
) -> Result<Self, RendererCreationError>where
F: Facade,
pub fn with_glyph_cache_dimensions<F>(
facade: &F,
width: u32,
height: u32
) -> Result<Self, RendererCreationError>where
F: Facade,
Construct a new empty Renderer
with the given glyph cache dimensions.
sourcepub fn fill<P, T>(&mut self, display: &Display, primitives: P, image_map: &Map<T>)where
P: PrimitiveWalker,
T: TextureDimensions,
pub fn fill<P, T>(&mut self, display: &Display, primitives: P, image_map: &Map<T>)where
P: PrimitiveWalker,
T: TextureDimensions,
Fill the inner vertex and command buffers by translating the given primitives
.
sourcepub fn draw<F, S, T>(
&self,
facade: &F,
surface: &mut S,
image_map: &Map<T>
) -> Result<(), DrawError>where
F: Facade,
S: Surface,
for<'a> Sampler<'a, T>: AsUniformValue,
pub fn draw<F, S, T>(
&self,
facade: &F,
surface: &mut S,
image_map: &Map<T>
) -> Result<(), DrawError>where
F: Facade,
S: Surface,
for<'a> Sampler<'a, T>: AsUniformValue,
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.