[−][src]Struct nannou::draw::renderer::Renderer
A helper type aimed at simplifying the rendering of conrod primitives via wgpu.
Implementations
impl Renderer
[src]
pub const DEFAULT_DEPTH_FORMAT: TextureFormat
[src]
The default depth format
pub const DEFAULT_GLYPH_CACHE_SIZE: [u32; 2]
[src]
The default size for the inner glyph cache.
pub const DEFAULT_GLYPH_CACHE_SCALE_TOLERANCE: f32
[src]
The default scale tolerance for the glyph cache.
pub const DEFAULT_GLYPH_CACHE_POSITION_TOLERANCE: f32
[src]
The default position tolerance for the glyph cache.
pub const GLYPH_CACHE_TEXTURE_FORMAT: TextureFormat
[src]
The texture format of the inner glyph cache.
pub fn new(
device: &Device,
output_attachment_size: [u32; 2],
output_scale_factor: f32,
sample_count: u32,
output_color_format: TextureFormat,
depth_format: TextureFormat,
glyph_cache_size: [u32; 2],
glyph_cache_scale_tolerance: f32,
glyph_cache_position_tolerance: f32
) -> Self
[src]
device: &Device,
output_attachment_size: [u32; 2],
output_scale_factor: f32,
sample_count: u32,
output_color_format: TextureFormat,
depth_format: TextureFormat,
glyph_cache_size: [u32; 2],
glyph_cache_scale_tolerance: f32,
glyph_cache_position_tolerance: f32
) -> Self
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.
pub fn clear(&mut self)
[src]
Clear all pending render commands vertex data.
pub fn fill(
&mut self,
device: &Device,
draw: &Draw,
scale_factor: f32,
output_attachment_size: [u32; 2]
)
[src]
&mut self,
device: &Device,
draw: &Draw,
scale_factor: f32,
output_attachment_size: [u32; 2]
)
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>
)
[src]
&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
)
[src]
&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.
pub fn render_to_frame(
&mut self,
device: &Device,
draw: &Draw,
scale_factor: f32,
frame: &Frame<'_>
)
[src]
&mut self,
device: &Device,
draw: &Draw,
scale_factor: f32,
frame: &Frame<'_>
)
Encode the necessary commands to render the contents of the given Drawing to the given Frame.
Trait Implementations
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<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
D: AdaptFrom<S, Swp, Dwp, T>,
Dwp: WhitePoint,
Swp: WhitePoint,
T: Component + Float,
[src]
D: AdaptFrom<S, Swp, Dwp, T>,
Dwp: WhitePoint,
Swp: WhitePoint,
T: Component + Float,
fn adapt_into_using<M>(self, method: M) -> D where
M: TransformMatrix<Swp, Dwp, T>,
[src]
M: TransformMatrix<Swp, Dwp, T>,
fn adapt_into(self) -> D
[src]
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, U> ConvertInto<U> for T where
U: ConvertFrom<T>,
[src]
U: ConvertFrom<T>,
fn convert_into(self) -> U
[src]
fn convert_unclamped_into(self) -> U
[src]
fn try_convert_into(self) -> Result<U, OutOfBounds<U>>
[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> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,