pub trait CommandPool<B: Backend>: Debug + Any + Send + Sync {
    unsafe fn reset(&mut self, release_resources: bool);
unsafe fn free<I>(&mut self, buffers: I)
        I: Iterator<Item = B::CommandBuffer>
; unsafe fn allocate_one(&mut self, level: Level) -> B::CommandBuffer { ... }
unsafe fn allocate<E>(&mut self, num: usize, level: Level, list: &mut E)
        E: Extend<B::CommandBuffer>
, { ... } }
Expand description

The allocated command buffers are associated with the creating command queue.

Required methods

Reset the command pool and the corresponding command buffers.

  • release_resources - if true, this command pool will recycle all the resources it own and give them back to the system.

You may not free the pool if a command buffer allocated from it is still in use (pool memory still in use).

Free command buffers allocated from this pool.

Provided methods

Allocate a single command buffer from the pool.

  • level - whether this command buffer is primary or secondary.

Allocate new command buffers from the pool.

  • num - how many buffers to return
  • level - whether to allocate primary or secondary command buffers.
  • list - an extendable list of command buffers into which to allocate.