Struct rafx_framework::DynCommandPool[][src]

pub struct DynCommandPool { /* fields omitted */ }

A helper that can be allocated as needed to create very short-lived command buffers. The object may not be persisted across frames. Instead, allocated a new one every frame. They are pooled, allocation is cheap and thread-safe.

This is designed for fire-and-forget command buffers. A DynCommandPool borrows a command pool that is not in use and not in flight, allocates out of it, resets itself after the appropriate number of frames pass, and returns itself to the pool for future reuse. See allocate_dyn_pool for more details

Implementations

impl DynCommandPool[src]

pub fn allocate_dyn_command_buffer(
    &mut self,
    command_buffer_def: &RafxCommandBufferDef
) -> RafxResult<DynCommandBuffer>
[src]

Allocate a command buffer and call begin() on it

pub fn pool(&mut self) -> &mut RafxCommandPool[src]

Get the underlying pool within the allocator. The pool will be destroyed after MAX_FRAMES_IN_FLIGHT pass, and all command buffers created with it must follow the same restrictions as a command buffer created via begin_command_buffer/end_command_buffer. It’s recommended to use begin_writing/end_writing as it is less error prone.

Trait Implementations

impl Drop for DynCommandPool[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> Downcast for T where
    T: Any

impl<T> DowncastSync for T where
    T: Any + Send + Sync

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

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

impl<T> Resource for T where
    T: Downcast + Send + Sync
[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.