[][src]Struct nannou::draw::renderer::Renderer

pub struct Renderer { /* fields omitted */ }

A helper type aimed at simplifying the rendering of conrod primitives via wgpu.

Methods

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],
    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]

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]

Generate a list of RenderCommands 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]

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]

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]

Encode the necessary commands to render the contents of the given Drawing to the given Frame.

Trait Implementations

impl Debug for Renderer[src]

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]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T, U> ConvertInto<U> for T where
    U: ConvertFrom<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> SetParameter for T

impl<T> SetParameter for T

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,