[][src]Struct nobs_vulkanism_headless::cmd::Stream

pub struct Stream {
    pub buffer: CommandBuffer,
    // some fields omitted
}

Wrapps a vulkan command buffer

The stream is basically a builder pattern for all vulkan functions related to vk::Cmd*. For every command in commands we can use push to enqueue it to the command stream.

When we are done building the command stream, we push it into a batch (BatchSubmit, AutoBatch, Frame). The batch can then submit all streams with one queue submit call. This is useful, since queue submit calls are very overhead heavy.

Fields

buffer: CommandBuffer

Methods

impl Stream[src]

pub fn new(streams: Arc<Mutex<StreamCache>>) -> Result<Self, Error>[src]

Is only called by Pool

pub fn begin(self) -> Result<Self, Error>[src]

Is implicitly called in Pool::begin_stream

pub fn push<T: StreamPush>(self, o: &T) -> Self[src]

Pushes a command into a stream.

Any struct implementing the StreamPush trait can be pushed into the stream. This can be used to build more complex commands from many primitive ones and be able to push them with one call.

pub fn waive(self)[src]

Returns the stream to the pool.

This breaks up configuring the stream and returns it to the pool. No vulkan commands are submitted, the command buffer can be reused again.

Auto Trait Implementations

impl Send for Stream

impl Sync for Stream

Blanket Implementations

impl<T> From for T[src]

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

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.