[−][src]Struct conrod_wgpu::Renderer
A helper type aimed at simplifying the rendering of conrod primitives via wgpu.
Methods
impl Renderer
[src]
pub fn new(
device: &Device,
msaa_samples: u32,
dst_format: TextureFormat
) -> Self
[src]
device: &Device,
msaa_samples: u32,
dst_format: TextureFormat
) -> Self
Construct a new Renderer
.
pub fn with_glyph_cache_dimensions(
device: &Device,
msaa_samples: u32,
dst_format: TextureFormat,
glyph_cache_dims: [u32; 2]
) -> Self
[src]
device: &Device,
msaa_samples: u32,
dst_format: TextureFormat,
glyph_cache_dims: [u32; 2]
) -> Self
Create a renderer with a specific size for the glyph cache.
pub fn commands(&self) -> Commands
[src]
Produce an Iterator
yielding Command
s.
pub fn fill<'a, P>(
&'a mut self,
image_map: &Map<Image>,
viewport: [f32; 4],
scale_factor: f64,
primitives: P
) -> Result<Option<GlyphCacheCommand<'a>>, CacheWriteErr> where
P: PrimitiveWalker,
[src]
&'a mut self,
image_map: &Map<Image>,
viewport: [f32; 4],
scale_factor: f64,
primitives: P
) -> Result<Option<GlyphCacheCommand<'a>>, CacheWriteErr> where
P: PrimitiveWalker,
Fill the inner vertex and command buffers by translating the given primitives
.
This method may return an Option<GlyphCacheCommand>
, in which case the user should use
the contained glyph_cpu_buffer_pool
to write the pixel data to the GPU, and then use a
copy_buffer_to_image
command to write the data to the given glyph_cache_texture
image.
pub fn render(&mut self, device: &Device, image_map: &Map<Image>) -> Render
[src]
Converts the inner list of Command
s generated via fill
to a list of
RenderPassCommand
s that are easily digestible by a wgpu::RenderPass
produced by a
wgpu::CommandEncoder
.
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]
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,
fn borrow_mut(&mut self) -> &mut T
[src]
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>,
type Error = Infallible
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, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,