[−][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
.
Methods
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
ⓘImportant traits for Commands<'a>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> 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,
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,