Struct polystrip::RendererBuilder[][src]

pub struct RendererBuilder { /* fields omitted */ }

Customization options for building a Renderer. Options are detailed on builder methods.

let renderer = RendererBuilder::new()
    .real_3d(true)
    .max_textures(2048)
    .build();

Implementations

impl RendererBuilder[src]

pub fn new() -> RendererBuilder[src]

Creates a new RendererBuilder with default values

pub fn real_3d(self, real_3d: bool) -> RendererBuilder[src]

If true, allows transform matrices to affect sprite depth. This clamps the depth between 0.0 and 1.0

Default: false

pub fn max_textures(self, max_textures: usize) -> RendererBuilder[src]

The allocation size of the texture pool.

Default: 1024

pub fn frames_in_flight(self, frames_in_flight: u32) -> RendererBuilder[src]

The number of frames that can be dispatched simultaneously

Default: 3

pub fn allocation_config(
    self,
    alloc_config: impl FnOnce(&DeviceProperties<'_>) -> Config + 'static
) -> RendererBuilder
[src]

The memory allocator’s allocation strategy.

Default: default_memory_config

pub fn build(self) -> Renderer[src]

Builds the renderer, initialising the gfx_hal backend.

pub fn build_rc(self) -> Rc<Renderer>[src]

Builds the renderer, initialising the gfx_hal backend, returning a Rc<Renderer> which can be used more easily with the rest of the API.

See also Renderer::wrap

Trait Implementations

impl Default for RendererBuilder[src]

Auto Trait Implementations

Blanket Implementations

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> From<T> for T[src]

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

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.