Struct vulkano::command_buffer::AutoCommandBufferBuilder
[−]
[src]
pub struct AutoCommandBufferBuilder<P = StandardCommandPoolBuilder> { /* fields omitted */ }
Note that command buffers allocated from the default command pool (Arc<StandardCommandPool>
)
don't implement the Send
and Sync
traits. If you use this pool, then the
AutoCommandBufferBuilder
will not implement Send
and Sync
either. Once a command buffer
is built, however, it does implement Send
and Sync
.
Methods
impl AutoCommandBufferBuilder<StandardCommandPoolBuilder>
[src]
fn new(
device: Arc<Device>,
queue_family: QueueFamily
) -> Result<AutoCommandBufferBuilder<StandardCommandPoolBuilder>, OomError>
device: Arc<Device>,
queue_family: QueueFamily
) -> Result<AutoCommandBufferBuilder<StandardCommandPoolBuilder>, OomError>
impl<P> AutoCommandBufferBuilder<P>
[src]
fn build(self) -> Result<AutoCommandBuffer<P::Alloc>, BuildError> where
P: CommandPoolBuilderAlloc,
P: CommandPoolBuilderAlloc,
Builds the command buffer.
fn begin_render_pass<F, C>(
self,
framebuffer: F,
secondary: bool,
clear_values: C
) -> Result<Self, BeginRenderPassError> where
F: FramebufferAbstract + RenderPassDescClearValues<C> + Send + Sync + 'static,
self,
framebuffer: F,
secondary: bool,
clear_values: C
) -> Result<Self, BeginRenderPassError> where
F: FramebufferAbstract + RenderPassDescClearValues<C> + Send + Sync + 'static,
Adds a command that enters a render pass.
If secondary
is true, then you will only be able to add secondary command buffers while
you're inside the first subpass of the render pass. If secondary
is false, you will only
be able to add inline draw commands and not secondary command buffers.
You must call this before you can add draw commands.
fn copy_buffer<S, D, T: ?Sized>(
self,
source: S,
destination: D
) -> Result<Self, CopyBufferError> where
S: TypedBufferAccess<Content = T> + Send + Sync + 'static,
D: TypedBufferAccess<Content = T> + Send + Sync + 'static,
T: ,
self,
source: S,
destination: D
) -> Result<Self, CopyBufferError> where
S: TypedBufferAccess<Content = T> + Send + Sync + 'static,
D: TypedBufferAccess<Content = T> + Send + Sync + 'static,
T: ,
Adds a command that copies from a buffer to another.
This command will copy from the source to the destination. If their size is not equal, then the amount of data copied is equal to the smallest of the two.
fn copy_buffer_to_image<S, D>(
self,
source: S,
destination: D
) -> Result<Self, CopyBufferToImageError> where
S: BufferAccess + Send + Sync + 'static,
D: ImageAccess + Send + Sync + 'static,
self,
source: S,
destination: D
) -> Result<Self, CopyBufferToImageError> where
S: BufferAccess + Send + Sync + 'static,
D: ImageAccess + Send + Sync + 'static,
Adds a command that copies from a buffer to an image.
fn copy_buffer_to_image_dimensions<S, D>(
self,
source: S,
destination: D,
offset: [u32; 3],
size: [u32; 3],
first_layer: u32,
num_layers: u32,
mipmap: u32
) -> Result<Self, CopyBufferToImageError> where
S: BufferAccess + Send + Sync + 'static,
D: ImageAccess + Send + Sync + 'static,
self,
source: S,
destination: D,
offset: [u32; 3],
size: [u32; 3],
first_layer: u32,
num_layers: u32,
mipmap: u32
) -> Result<Self, CopyBufferToImageError> where
S: BufferAccess + Send + Sync + 'static,
D: ImageAccess + Send + Sync + 'static,
Adds a command that copies from a buffer to an image.
fn dispatch<Cp, S, Pc>(
self,
dimensions: [u32; 3],
pipeline: Cp,
sets: S,
constants: Pc
) -> Result<Self, DispatchError> where
Cp: ComputePipelineAbstract + Send + Sync + 'static + Clone,
S: DescriptorSetsCollection,
self,
dimensions: [u32; 3],
pipeline: Cp,
sets: S,
constants: Pc
) -> Result<Self, DispatchError> where
Cp: ComputePipelineAbstract + Send + Sync + 'static + Clone,
S: DescriptorSetsCollection,
fn draw<V, Gp, S, Pc>(
self,
pipeline: Gp,
dynamic: DynamicState,
vertices: V,
sets: S,
constants: Pc
) -> Result<Self, DrawError> where
Gp: GraphicsPipelineAbstract + VertexSource<V> + Send + Sync + 'static + Clone,
S: DescriptorSetsCollection,
self,
pipeline: Gp,
dynamic: DynamicState,
vertices: V,
sets: S,
constants: Pc
) -> Result<Self, DrawError> where
Gp: GraphicsPipelineAbstract + VertexSource<V> + Send + Sync + 'static + Clone,
S: DescriptorSetsCollection,
fn draw_indexed<V, Gp, S, Pc, Ib, I>(
self,
pipeline: Gp,
dynamic: DynamicState,
vertices: V,
index_buffer: Ib,
sets: S,
constants: Pc
) -> Result<Self, DrawIndexedError> where
Gp: GraphicsPipelineAbstract + VertexSource<V> + Send + Sync + 'static + Clone,
S: DescriptorSetsCollection,
Ib: BufferAccess + TypedBufferAccess<Content = [I]> + Send + Sync + 'static,
I: Index + 'static,
self,
pipeline: Gp,
dynamic: DynamicState,
vertices: V,
index_buffer: Ib,
sets: S,
constants: Pc
) -> Result<Self, DrawIndexedError> where
Gp: GraphicsPipelineAbstract + VertexSource<V> + Send + Sync + 'static + Clone,
S: DescriptorSetsCollection,
Ib: BufferAccess + TypedBufferAccess<Content = [I]> + Send + Sync + 'static,
I: Index + 'static,
fn draw_indirect<V, Gp, S, Pc, Ib>(
self,
pipeline: Gp,
dynamic: DynamicState,
vertices: V,
indirect_buffer: Ib,
sets: S,
constants: Pc
) -> Result<Self, DrawIndirectError> where
Gp: GraphicsPipelineAbstract + VertexSource<V> + Send + Sync + 'static + Clone,
S: DescriptorSetsCollection,
Ib: BufferAccess + TypedBufferAccess<Content = [DrawIndirectCommand]> + Send + Sync + 'static,
self,
pipeline: Gp,
dynamic: DynamicState,
vertices: V,
indirect_buffer: Ib,
sets: S,
constants: Pc
) -> Result<Self, DrawIndirectError> where
Gp: GraphicsPipelineAbstract + VertexSource<V> + Send + Sync + 'static + Clone,
S: DescriptorSetsCollection,
Ib: BufferAccess + TypedBufferAccess<Content = [DrawIndirectCommand]> + Send + Sync + 'static,
fn end_render_pass(self) -> Result<Self, AutoCommandBufferBuilderContextError>
Adds a command that ends the current render pass.
This must be called after you went through all the subpasses and before you can build the command buffer or add further commands.
fn fill_buffer<B>(self, buffer: B, data: u32) -> Result<Self, FillBufferError> where
B: BufferAccess + Send + Sync + 'static,
B: BufferAccess + Send + Sync + 'static,
Adds a command that writes the content of a buffer.
This function is similar to the memset
function in C. The data
parameter is a number
that will be repeatidely written through the entire buffer.
Note: This function is technically safe because buffers can only contain integers or floating point numbers, which are always valid whatever their memory representation is. But unless your buffer actually contains only 32-bits integers, you are encouraged to use this function only for zeroing the content of a buffer by passing
0
for the data.
fn next_subpass(
self,
secondary: bool
) -> Result<Self, AutoCommandBufferBuilderContextError>
self,
secondary: bool
) -> Result<Self, AutoCommandBufferBuilderContextError>
Adds a command that jumps to the next subpass of the current render pass.
fn update_buffer<B, D>(
self,
buffer: B,
data: D
) -> Result<Self, UpdateBufferError> where
B: TypedBufferAccess<Content = D> + Send + Sync + 'static,
D: Send + Sync + 'static,
self,
buffer: B,
data: D
) -> Result<Self, UpdateBufferError> where
B: TypedBufferAccess<Content = D> + Send + Sync + 'static,
D: Send + Sync + 'static,
Adds a command that writes data to a buffer.
If data
is larger than the buffer, only the part of data
that fits is written. If the
buffer is larger than data
, only the start of the buffer is written.