[][src]Struct gfx_hal::pool::CommandPool

pub struct CommandPool<B: Backend, C> { /* fields omitted */ }

Strong-typed command pool.

This a safer wrapper around RawCommandPool which ensures that only one command buffer is recorded at the same time from the current queue. Command buffers are stored internally and can only be obtained via a strong-typed CommandBuffer wrapper for encoding.

Methods

impl<B: Backend, C> CommandPool<B, C>[src]

pub unsafe fn new(raw: B::CommandPool) -> Self[src]

Create typed command pool from raw.

Safety

<C as Capability>::supported_by(queue_type) must return true for queue_type being the type of queues from family this raw pool is associated with.

pub unsafe fn reset(&mut self, release_resources: bool)[src]

pub fn acquire_command_buffer<S: Shot>(&mut self) -> CommandBuffer<B, C, S>[src]

Allocates a new primary command buffer from the pool.

pub fn acquire_secondary_command_buffer<S: Shot>(
    &mut self
) -> SecondaryCommandBuffer<B, C, S>
[src]

Allocates a new secondary command buffer from the pool.

pub unsafe fn free<I>(&mut self, cmd_buffers: I) where
    I: IntoIterator,
    I::Item: IntoRawCommandBuffer<B, C>, 
[src]

Free the given iterator of command buffers from the pool.

pub fn into_raw(self) -> B::CommandPool[src]

Downgrade a typed command pool to untyped one.

impl<B: Backend, C: Supports<Graphics>> CommandPool<B, C>[src]

pub fn acquire_subpass_command_buffer<S: Shot>(
    &mut self
) -> SubpassCommandBuffer<B, S>
[src]

Allocates a new subpass command buffer from the pool.

Trait Implementations

impl<B: Debug + Backend, C: Debug> Debug for CommandPool<B, C> where
    B::CommandPool: Debug
[src]

Auto Trait Implementations

impl<B, C> Unpin for CommandPool<B, C> where
    C: Unpin,
    <B as Backend>::CommandPool: Unpin

impl<B, C> Send for CommandPool<B, C> where
    C: Send,
    <B as Backend>::CommandPool: Send

impl<B, C> Sync for CommandPool<B, C> where
    C: Sync,
    <B as Backend>::CommandPool: Sync

impl<B, C> UnwindSafe for CommandPool<B, C> where
    C: UnwindSafe,
    <B as Backend>::CommandPool: UnwindSafe

impl<B, C> RefUnwindSafe for CommandPool<B, C> where
    C: RefUnwindSafe,
    <B as Backend>::CommandPool: RefUnwindSafe

Blanket Implementations

impl<T> Supports<T> for T[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.

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

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

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