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

pub struct Builder {
    pub depth_format: TextureFormat,
    pub glyph_cache_size: [u32; 2],
    pub glyph_cache_scale_tolerance: f32,
    pub glyph_cache_position_tolerance: f32,
}

A type aimed at simplifying construction of a draw::Renderer.

Fields

depth_format: TextureFormatglyph_cache_size: [u32; 2]glyph_cache_scale_tolerance: f32glyph_cache_position_tolerance: f32

Implementations

impl Builder[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 fn new() -> Self[src]

Begin building a new draw::Renderer.

pub fn depth_format(self, format: TextureFormat) -> Self[src]

Specify the texture format that should be used to represent depth data in the renderer's inner depth_texture.

pub fn glyph_cache_size(self, size: [u32; 2]) -> Self[src]

The dimensions of the texture used to cache glyphs.

Some text-heavy apps may require a text cache larger than the default size in order to run efficiently without text glitching. If the texture is insufficiently large for all text currently appearing within the output attachment, artifacts will appear in the text.

pub fn glyph_cache_scale_tolerance(self, tolerance: f32) -> Self[src]

Specifies the tolerances (maximum allowed difference) for judging whether an existing glyph in the cache is close enough to the requested glyph in scale to be used in its place.

Due to floating point inaccuracies a min value of 0.001 is enforced.

pub fn glyph_cache_position_tolerance(self, tolerance: f32) -> Self[src]

Specifies the tolerances (maximum allowed difference) for judging whether an existing glyph in the cache is close enough to the requested glyph in subpixel offset to be used in its place.

Due to floating point inaccuracies a min value of 0.001 is enforced.

pub fn build_from_texture_descriptor(
    self,
    device: &Device,
    descriptor: &TextureDescriptor<'_>
) -> Renderer
[src]

Build the draw::Renderer ready to target an output attachment of the given descriptor.

pub fn build(
    self,
    device: &Device,
    output_attachment_size: [u32; 2],
    output_scale_factor: f32,
    sample_count: u32,
    output_color_format: TextureFormat
) -> Renderer
[src]

Build the draw::Renderer ready to target an output attachment with the given size, sample count and format.

Trait Implementations

impl Clone for Builder[src]

impl Debug for Builder[src]

impl Default for Builder[src]

Auto Trait Implementations

impl RefUnwindSafe for Builder

impl Send for Builder

impl Sync for Builder

impl Unpin for Builder

impl UnwindSafe for Builder

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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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