Struct polystrip::RendererBuilder [−][src]
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]
self,
alloc_config: impl FnOnce(&DeviceProperties<'_>) -> Config + 'static
) -> RendererBuilder
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]
fn default() -> RendererBuilder
[src]
Auto Trait Implementations
impl !RefUnwindSafe for RendererBuilder
impl !Send for RendererBuilder
impl !Sync for RendererBuilder
impl Unpin for RendererBuilder
impl !UnwindSafe for RendererBuilder
Blanket Implementations
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,
pub fn borrow_mut(&mut self) -> &mut T
[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, 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.
pub 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>,