Struct nannou::draw::renderer::Renderer [−][src]
pub struct Renderer { /* fields omitted */ }
Expand description
A helper type aimed at simplifying the rendering of conrod primitives via wgpu.
Implementations
The default depth format
The default size for the inner glyph cache.
The default scale tolerance for the glyph cache.
The default position tolerance for the glyph cache.
The texture format of the inner glyph cache.
The index format used to index into vertices.
Create a new Renderer, ready to target an output attachment with the given size, sample count and color format.
See the RendererBuilder type for a simplified approach to building a renderer that will fall back to a set of reasonable defaults.
The depth_format
will be used to construct a depth texture for depth testing.
The glyph_cache_size
will be used to create a texture on which glyphs will be stored for
efficient look-up.
Generate a list of RenderCommand
s from the given Draw instance and prepare any
necessary vertex data.
Note that the given Draw instance will be drained of its commands.
pub fn encode_render_pass(
&mut self,
device: &Device,
encoder: &mut CommandEncoder,
draw: &Draw,
scale_factor: f32,
output_attachment_size: [u32; 2],
output_attachment: &TextureView,
resolve_target: Option<&TextureView>
)
pub fn encode_render_pass(
&mut self,
device: &Device,
encoder: &mut CommandEncoder,
draw: &Draw,
scale_factor: f32,
output_attachment_size: [u32; 2],
output_attachment: &TextureView,
resolve_target: Option<&TextureView>
)
Encode a render pass with the given Drawing to the given output_attachment
.
If the Drawing has been scaled for handling DPI, specify the necessary scale_factor
for scaling back to the output_attachment_size
(physical dimensions).
If the output_attachment
is multisampled and should be resolved to another texture,
include the resolve_target
.
pub fn render_to_texture(
&mut self,
device: &Device,
encoder: &mut CommandEncoder,
draw: &Draw,
texture: &Texture
)
pub fn render_to_texture(
&mut self,
device: &Device,
encoder: &mut CommandEncoder,
draw: &Draw,
texture: &Texture
)
Encode the necessary commands to render the contents of the given Drawing to the given Texture.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Renderer
impl !UnwindSafe for Renderer
Blanket Implementations
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
T: Component + Float,
Swp: WhitePoint,
Dwp: WhitePoint,
D: AdaptFrom<S, Swp, Dwp, T>,
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
T: Component + Float,
Swp: WhitePoint,
Dwp: WhitePoint,
D: AdaptFrom<S, Swp, Dwp, T>,
Mutably borrows from an owned value. Read more
Convert into T with values clamped to the color defined bounds Read more
Convert into T. The resulting color might be invalid in its color space Read more
Convert into T, returning ok if the color is inside of its defined range,
otherwise an OutOfBounds
error is returned which contains the unclamped color. Read more