[−][src]Struct conrod_gfx::Renderer
This type is used for translating render::Primitives
into Commands
s that indicate how to
draw the GUI using gfx
.
Implementations
impl<'a, R: Resources> Renderer<'a, R>
[src][−]
pub fn new<F>(
factory: &mut F,
rtv: &RenderTargetView<R, ColorFormat>,
dpi_factor: f64
) -> Result<Self, RendererCreationError> where
F: Factory<R>,
[src][−]
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
pub fn commands(&self) -> Commands<'_>ⓘ
[src][−]
Produce an Iterator
yielding Command
s.
pub fn fill<P, C>(
&mut self,
encoder: &mut Encoder<R, C>,
dims: (f32, f32),
dpi_factor: f64,
primitives: P,
image_map: &Map<(ShaderResourceView<R, [f32; 4]>, (u32, u32))>
) where
P: PrimitiveWalker,
C: CommandBuffer<R>,
[src][−]
&mut self,
encoder: &mut Encoder<R, C>,
dims: (f32, f32),
dpi_factor: f64,
primitives: P,
image_map: &Map<(ShaderResourceView<R, [f32; 4]>, (u32, u32))>
) where
P: PrimitiveWalker,
C: CommandBuffer<R>,
Fill the inner vertex and command buffers by translating the given primitives
.
pub fn draw<F, C>(
&self,
factory: &mut F,
encoder: &mut Encoder<R, C>,
image_map: &Map<(ShaderResourceView<R, [f32; 4]>, (u32, u32))>
) where
F: Factory<R>,
C: CommandBuffer<R>,
[src][−]
&self,
factory: &mut F,
encoder: &mut Encoder<R, C>,
image_map: &Map<(ShaderResourceView<R, [f32; 4]>, (u32, u32))>
) where
F: Factory<R>,
C: CommandBuffer<R>,
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.
pub fn on_resize(&mut self, rtv: RenderTargetView<R, ColorFormat>)
[src][−]
Call this routine when a window has been resized. This ensures that conrod primitives are
drawn properly with the draw
call.
pub fn clear<C>(&self, encoder: &mut Encoder<R, C>, clear_color: [f32; 4]) where
C: CommandBuffer<R>,
[src][−]
C: CommandBuffer<R>,
Call this routine to clear the render target.
Auto Trait Implementations
impl<'a, R> !RefUnwindSafe for Renderer<'a, R>
impl<'a, R> Send for Renderer<'a, R> where
<R as Resources>::Buffer: Send + Sync,
<R as Resources>::Mapping: Send,
<R as Resources>::PipelineStateObject: Send + Sync,
<R as Resources>::Program: Send + Sync,
<R as Resources>::RenderTargetView: Send + Sync,
<R as Resources>::Sampler: Send + Sync,
<R as Resources>::ShaderResourceView: Send + Sync,
<R as Resources>::Texture: Send + Sync,
<R as Resources>::Buffer: Send + Sync,
<R as Resources>::Mapping: Send,
<R as Resources>::PipelineStateObject: Send + Sync,
<R as Resources>::Program: Send + Sync,
<R as Resources>::RenderTargetView: Send + Sync,
<R as Resources>::Sampler: Send + Sync,
<R as Resources>::ShaderResourceView: Send + Sync,
<R as Resources>::Texture: Send + Sync,
impl<'a, R> Sync for Renderer<'a, R> where
<R as Resources>::Buffer: Send + Sync,
<R as Resources>::Mapping: Send,
<R as Resources>::PipelineStateObject: Send + Sync,
<R as Resources>::Program: Send + Sync,
<R as Resources>::RenderTargetView: Send + Sync,
<R as Resources>::Sampler: Send + Sync,
<R as Resources>::ShaderResourceView: Send + Sync,
<R as Resources>::Texture: Send + Sync,
<R as Resources>::Buffer: Send + Sync,
<R as Resources>::Mapping: Send,
<R as Resources>::PipelineStateObject: Send + Sync,
<R as Resources>::Program: Send + Sync,
<R as Resources>::RenderTargetView: Send + Sync,
<R as Resources>::Sampler: Send + Sync,
<R as Resources>::ShaderResourceView: Send + Sync,
<R as Resources>::Texture: Send + Sync,
impl<'a, R> Unpin for Renderer<'a, R>
impl<'a, R> !UnwindSafe for Renderer<'a, R>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src][+]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> From<T> for T
[src][+]
impl<T, U> Into<U> for T where
U: From<T>,
[src][+]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src][+]
U: Into<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src][+]
U: TryFrom<T>,