[−][src]Struct rendy::command::CommandPool
Simple pool wrapper.
Doesn't provide any guarantees.
Wraps raw buffers into CommandCommand buffer
.
Methods
impl<B, C, R> CommandPool<B, C, R> where
B: Backend,
R: Reset,
[src]
B: Backend,
R: Reset,
pub unsafe fn create(
family: FamilyId,
capability: C,
device: &Device<B>
) -> Result<CommandPool<B, C, R>, OutOfMemory> where
C: Capability,
R: Reset,
[src]
family: FamilyId,
capability: C,
device: &Device<B>
) -> Result<CommandPool<B, C, R>, OutOfMemory> where
C: Capability,
R: Reset,
Create command pool associated with the family. Command buffers created from the pool could be submitted to the queues of the family.
Safety
Family must belong to specified device. Family must have specified capability.
pub unsafe fn from_raw(
raw: <B as Backend>::CommandPool,
capability: C,
reset: R,
family: FamilyId
) -> CommandPool<B, C, R>
[src]
raw: <B as Backend>::CommandPool,
capability: C,
reset: R,
family: FamilyId
) -> CommandPool<B, C, R>
Wrap raw command pool.
Safety
raw
must be valid command pool handle.- The command pool must be created for specified
family
index. capability
must be subset of capabilites of thefamily
the pool was created for.- if
reset
isIndividualReset
the pool must be created with individual command buffer reset flag set.
pub fn allocate_buffers<L>(
&mut self,
count: usize
) -> Vec<CommandBuffer<B, C, InitialState, L, R>> where
C: Capability,
L: Level,
[src]
&mut self,
count: usize
) -> Vec<CommandBuffer<B, C, InitialState, L, R>> where
C: Capability,
L: Level,
Allocate new command buffers.
pub unsafe fn free_buffers<impl Resettable, impl Level, impl IntoIterator- >>(
&mut self,
buffers: impl IntoIterator- >
) where
impl IntoIterator- >: IntoIterator<Item = CommandBuffer<B, C, impl Resettable, impl Level, R>>,
impl Level: Level,
impl Resettable: Resettable,
[src]
&mut self,
buffers: impl IntoIterator
) where
impl IntoIterator
impl Level: Level,
impl Resettable: Resettable,
Free buffers. Buffers must be in droppable state. TODO: Validate buffers were allocated from this pool.
pub unsafe fn reset(&mut self)
[src]
Reset all buffers of this pool.
Safety
All buffers allocated from this pool must be marked reset.
See [CommandBuffer::mark_reset
](struct.Command buffer.html#method.mark_reset)
pub unsafe fn dispose(self, device: &Device<B>)
[src]
pub fn with_queue_type(self) -> CommandPool<B, QueueType, R> where
C: Capability,
[src]
C: Capability,
Convert capability level
pub fn with_capability<U>(
self
) -> Result<CommandPool<B, U, R>, CommandPool<B, C, R>> where
C: Supports<U>,
[src]
self
) -> Result<CommandPool<B, U, R>, CommandPool<B, C, R>> where
C: Supports<U>,
Convert capability level
impl<B, C, R> CommandPool<B, C, R> where
B: Backend,
[src]
B: Backend,
pub fn family_id(&self) -> FamilyId
[src]
Get owner id.
pub fn assert_family_owner(&self, family: &Family<B, C>)
[src]
Assert specified family is owner.
pub fn assert_device_owner(&self, device: &Device<B>)
[src]
Assert specified device is owner.
pub fn assert_instance_owner(&self, instance: &Instance<B>)
[src]
Assert specified instance is owner.
Trait Implementations
Auto Trait Implementations
impl<B, C, R> Unpin for CommandPool<B, C, R> where
C: Unpin,
R: Unpin,
<B as Backend>::CommandPool: Unpin,
C: Unpin,
R: Unpin,
<B as Backend>::CommandPool: Unpin,
impl<B, C, R> Sync for CommandPool<B, C, R> where
C: Sync,
R: Sync,
<B as Backend>::CommandPool: Sync,
C: Sync,
R: Sync,
<B as Backend>::CommandPool: Sync,
impl<B, C, R> Send for CommandPool<B, C, R> where
C: Send,
R: Send,
<B as Backend>::CommandPool: Send,
C: Send,
R: Send,
<B as Backend>::CommandPool: Send,
impl<B, C, R> UnwindSafe for CommandPool<B, C, R> where
C: UnwindSafe,
R: UnwindSafe,
<B as Backend>::CommandPool: UnwindSafe,
C: UnwindSafe,
R: UnwindSafe,
<B as Backend>::CommandPool: UnwindSafe,
impl<B, C, R> RefUnwindSafe for CommandPool<B, C, R> where
C: RefUnwindSafe,
R: RefUnwindSafe,
<B as Backend>::CommandPool: RefUnwindSafe,
C: RefUnwindSafe,
R: RefUnwindSafe,
<B as Backend>::CommandPool: RefUnwindSafe,
Blanket Implementations
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.
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Supports<T> for T
[src]
impl<T> SetParameter for T
[src]
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
[src]
T: Parameter<Self>,
Sets value
as a parameter of self
.
impl<T> Erased for T
[src]
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
D: AdaptFrom<S, Swp, Dwp, T>,
Dwp: WhitePoint,
Swp: WhitePoint,
T: Component + Float,
[src]
D: AdaptFrom<S, Swp, Dwp, T>,
Dwp: WhitePoint,
Swp: WhitePoint,
T: Component + Float,
fn adapt_into_using<M>(self, method: M) -> D where
M: TransformMatrix<Swp, Dwp, T>,
[src]
M: TransformMatrix<Swp, Dwp, T>,
fn adapt_into(self) -> D
[src]
Convert the source color to the destination color using the bradford method by default Read more