[][src]Struct amethyst_rendy::rendy::command::CommandBuffer

pub struct CommandBuffer<B, C, S, L = PrimaryLevel, R = NoIndividualReset> where
    B: Backend
{ /* fields omitted */ }

Command buffer wrapper. This wrapper defines state with usage, level and ability to be individually reset at type level. This way many methods become safe.

Methods

impl<B, C, U, L, R> CommandBuffer<B, C, RecordingState<U, OutsideRenderPass>, L, R> where
    B: Backend,
    C: Capability,
    L: Level
[src]

pub fn encoder(&mut self) -> Encoder<B, C, L>[src]

Get encoder that will encode commands into this command buffer.

impl<B, C, U, R> CommandBuffer<B, C, RecordingState<U, RenderPassContinue>, SecondaryLevel, R> where
    B: Backend,
    C: Supports<Graphics>, 
[src]

pub fn render_pass_encoder(&mut self) -> RenderPassEncoder<B>[src]

Get encoder that will encode render-pass commands into this command buffer.

impl<B, C, P, L, R> CommandBuffer<B, C, ExecutableState<OneShot, P>, L, R> where
    B: Backend,
    L: Copy,
    P: Copy
[src]

pub fn submit_once(
    self
) -> (Submit<B, NoSimultaneousUse, L, P>, CommandBuffer<B, C, PendingState<InvalidState>, L, R>)
[src]

Produce Submit object that can be used to populate submission.

impl<B, C, S, L, P, R> CommandBuffer<B, C, ExecutableState<MultiShot<S>, P>, L, R> where
    B: Backend,
    L: Copy,
    P: Copy,
    S: Copy
[src]

pub fn submit(
    self
) -> (Submit<B, S, L, P>, CommandBuffer<B, C, PendingState<ExecutableState<MultiShot<S>, P>>, L, R>)
[src]

Produce Submit object that can be used to populate submission.

impl<B, C, S, L, R> CommandBuffer<B, C, S, L, R> where
    B: Backend
[src]

pub unsafe fn change_state<U, impl FnOnce(S) -> U>(
    self,
    f: impl FnOnce(S) -> U
) -> CommandBuffer<B, C, U, L, R> where
    impl FnOnce(S) -> U: FnOnce(S) -> U, 
[src]

Change state of the command buffer.

Safety

  • This method must be used only to reflect state changed due to raw handle usage.

pub fn capability(&self) -> C where
    C: Capability
[src]

Get buffers capability.

pub fn family(&self) -> FamilyId[src]

Get buffers family.

pub fn with_queue_type(self) -> CommandBuffer<B, QueueType, S, L, R> where
    C: Capability
[src]

Convert capability level.

pub fn with_capability<U>(
    self
) -> Result<CommandBuffer<B, U, S, L, R>, CommandBuffer<B, C, S, L, R>> where
    C: Supports<U>, 
[src]

Convert capability level.

impl<B, C, L, R> CommandBuffer<B, C, InitialState, L, R> where
    B: Backend
[src]

pub fn begin<'a, U, P, impl BeginInfo<'a, B, L, PassRelation = P>>(
    self,
    usage: U,
    info: impl BeginInfo<'a, B, L, PassRelation = P>
) -> CommandBuffer<B, C, RecordingState<U, P>, L, R> where
    P: RenderPassRelation<L>,
    U: Usage,
    impl BeginInfo<'a, B, L, PassRelation = P>: BeginInfo<'a, B, L, PassRelation = P>, 
[src]

Begin recording command buffer.

Parameters

usage - specifies usage of the command buffer. Possible types are OneShot, MultiShot.

impl<'a, B, C, U, P, L, R> CommandBuffer<B, C, RecordingState<U, P>, L, R> where
    B: Backend
[src]

pub fn finish(self) -> CommandBuffer<B, C, ExecutableState<U, P>, L, R>[src]

Finish recording command buffer.

impl<B, C, N, L, R> CommandBuffer<B, C, PendingState<N>, L, R> where
    B: Backend
[src]

pub unsafe fn mark_complete(self) -> CommandBuffer<B, C, N, L, R>[src]

Mark command buffer as complete.

Safety

None of Submit instances created from this CommandBuffer are alive.

If this is PrimaryLevel buffer then for each command queue where Submit instance (created from this CommandBuffer) was submitted at least one Fence submitted within same Submission or later in unset state was set.

If this is Secondary buffer then all primary command buffers where Submit instance (created from this CommandBuffer) was submitted must be complete.

impl<B, C, S, L> CommandBuffer<B, C, S, L, IndividualReset> where
    B: Backend,
    S: Resettable
[src]

pub fn reset(self) -> CommandBuffer<B, C, InitialState, L, IndividualReset>[src]

Reset command buffer.

impl<B, C, S, L> CommandBuffer<B, C, S, L, NoIndividualReset> where
    B: Backend,
    S: Resettable
[src]

pub unsafe fn mark_reset(
    self
) -> CommandBuffer<B, C, InitialState, L, NoIndividualReset>
[src]

Mark command buffer as reset.

Safety

  • This function must be used only to reflect command buffer being reset implicitly. For instance:
  • CommandPool::reset on pool from which the command buffer was allocated.
  • Raw handle usage.

impl<B, C, S, L, R> CommandBuffer<B, C, S, L, R> where
    B: Backend,
    S: Resettable
[src]

pub fn into_raw(self) -> <B as Backend>::CommandBuffer[src]

Dispose of command buffer wrapper releasing raw comman buffer value. This function is intended to be used to deallocate command buffer.

pub fn raw(&mut self) -> &mut <B as Backend>::CommandBuffer[src]

Get raw command buffer handle.

impl<B, C, S, L, R> CommandBuffer<B, C, S, L, R> where
    B: Backend
[src]

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

impl<B, C, S, L, R> Debug for CommandBuffer<B, C, S, L, R> where
    B: Backend,
    C: Debug,
    L: Debug,
    R: Debug,
    S: Debug
[src]

impl<B, C, S, L, R> Sync for CommandBuffer<B, C, S, L, R> where
    B: Backend,
    C: Sync,
    L: Sync,
    R: Sync,
    S: Sync,
    <B as Backend>::CommandBuffer: Sync,
    FamilyId: Sync,
    Relevant: Sync
[src]

impl<B, C, S, L, R> Send for CommandBuffer<B, C, S, L, R> where
    B: Backend,
    C: Send,
    L: Send,
    R: Send,
    S: Send,
    <B as Backend>::CommandBuffer: Send,
    FamilyId: Send,
    Relevant: Send
[src]

Auto Trait Implementations

impl<B, C, S, L, R> Unpin for CommandBuffer<B, C, S, L, R> where
    C: Unpin,
    L: Unpin,
    R: Unpin,
    S: Unpin,
    <B as Backend>::CommandBuffer: Unpin

impl<B, C, S, L, R> UnwindSafe for CommandBuffer<B, C, S, L, R> where
    C: UnwindSafe,
    L: UnwindSafe,
    R: UnwindSafe,
    S: UnwindSafe,
    <B as Backend>::CommandBuffer: RefUnwindSafe

impl<B, C, S, L, R> RefUnwindSafe for CommandBuffer<B, C, S, L, R> where
    C: RefUnwindSafe,
    L: RefUnwindSafe,
    R: RefUnwindSafe,
    S: RefUnwindSafe,
    <B as Backend>::CommandBuffer: RefUnwindSafe

Blanket Implementations

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> Borrow<T> for T where
    T: ?Sized
[src]

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

impl<T> Any for T where
    T: 'static + ?Sized
[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]

fn adapt_into(self) -> D[src]

Convert the source color to the destination color using the bradford method by default Read more

impl<T> SetParameter for T[src]

fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
    T: Parameter<Self>, 
[src]

Sets value as a parameter of self.

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

impl<T> Erased for T[src]

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

type Output = T

Should always be Self

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 
[src]

impl<T> Resource for T where
    T: Any + Send + Sync
[src]

impl<T> Any for T where
    T: Any
[src]

impl<T> Event for T where
    T: Send + Sync + 'static, 
[src]