SPARK  0.1.0
A general purpose game engine written in C++.
Loading...
Searching...
No Matches
spark::render::CommandBuffer< CommandBufferType, BufferType, VertexBufferType, IndexBufferType, ImageType, PipelineType > Class Template Referenceabstract

#include <CommandBuffer.h>

Inheritance diagram for spark::render::CommandBuffer< CommandBufferType, BufferType, VertexBufferType, IndexBufferType, ImageType, PipelineType >:
spark::render::ICommandBuffer

Public Types

using command_buffer_type = CommandBufferType
 
using buffer_type = BufferType
 
using vertex_buffer_type = VertexBufferType
 
using index_buffer_type = IndexBufferType
 
using image_type = ImageType
 
using pipeline_type = PipelineType
 
using pipeline_layout_type = typename pipeline_type::pipeline_layout_type
 
using descriptor_set_layout_type = typename pipeline_layout_type::descriptor_set_layout_type
 
using push_constants_layout_type = typename pipeline_layout_type::push_constants_layout_type
 
using descriptor_set_type = typename descriptor_set_layout_type::descriptor_set_type
 

Public Member Functions

virtual void transfer (buffer_type &source, buffer_type &target, unsigned source_element, unsigned target_element, unsigned elements) const =0
 Performs a buffer to buffer transfer from source to target.
 
virtual void transfer (image_type &source, buffer_type &target, unsigned first_subresource, unsigned target_element, unsigned subresources) const =0
 Performs a buffer to buffer transfer from source to target.
 
virtual void transfer (buffer_type &source, image_type &target, unsigned source_element, unsigned first_subresource, unsigned elements) const =0
 Performs a buffer to buffer transfer from source to target.
 
virtual void transfer (image_type &source, image_type &target, unsigned source_subresource, unsigned target_subresource, unsigned subresources) const =0
 Performs a buffer to buffer transfer from source to target.
 
virtual void transfer (std::shared_ptr< buffer_type > source, buffer_type &target, unsigned source_element, unsigned target_element, unsigned elements) const =0
 Performs a buffer to buffer transfer from source to target.
 
virtual void transfer (std::shared_ptr< buffer_type > source, image_type &target, unsigned source_element, unsigned first_subresource, unsigned elements) const =0
 Performs a buffer to buffer transfer from source to target.
 
virtual void transfer (std::shared_ptr< image_type > source, image_type &target, unsigned first_subresource, unsigned target_element, unsigned subresources) const =0
 Performs a buffer to buffer transfer from source to target.
 
virtual void transfer (std::shared_ptr< image_type > source, buffer_type &target, unsigned int first_subresource, unsigned int target_element, unsigned int subresources) const =0
 Performs a buffer to buffer transfer from source to target.
 
virtual void use (const pipeline_type &pipeline) const noexcept=0
 Sets the pipeline to be used for subsequent draw calls.
 
virtual void bind (const descriptor_set_type &descriptor_set) const =0
 Binds the descriptor_set to the last pipeline used by the command buffer.
 
virtual void bind (const descriptor_set_type &descriptor_set, const pipeline_type &pipeline) const noexcept=0
 Binds the descriptor_set to the last pipeline used by the command buffer.
 
virtual void bind (const index_buffer_type &index_buffer) const noexcept=0
 Binds the descriptor_set to the last pipeline used by the command buffer.
 
virtual void bind (const vertex_buffer_type &vertex_buffer) const noexcept=0
 Binds the descriptor_set to the last pipeline used by the command buffer.
 
virtual void draw (unsigned vertices, unsigned instances, unsigned first_vertex, unsigned first_instance) const noexcept=0
 Draw a number of vertices from the currently bound vertex buffer.
 
virtual void draw (const vertex_buffer_type &vertex_buffer, unsigned instances, unsigned first_vertex, unsigned first_instance) const noexcept=0
 Draw a number of vertices from the currently bound vertex buffer.
 
virtual void drawIndexed (unsigned indices, unsigned instances, unsigned first_index, int vertex_offset, unsigned first_instance) const noexcept=0
 Draws the currently bound vertex buffer with a set of indices from the currently bound index buffer.
 
virtual void drawIndexed (const index_buffer_type &index_buffer, unsigned instances, unsigned first_index, int vertex_offset, unsigned first_instance) const noexcept=0
 Draws the currently bound vertex buffer with a set of indices from the currently bound index buffer.
 
virtual void drawIndexed (const vertex_buffer_type &vertex_buffer, const index_buffer_type &index_buffer, unsigned instances, unsigned first_index, int vertex_offset, unsigned first_instance) const noexcept=0
 Draws the currently bound vertex buffer with a set of indices from the currently bound index buffer.
 
virtual void execute (std::shared_ptr< const command_buffer_type > command_buffer) const =0
 Executes a secondary command buffer.
 
virtual void execute (const std::vector< std::shared_ptr< const command_buffer_type > > &command_buffers) const =0
 Executes a secondary command buffer.
 
virtual void pushConstants (const push_constants_layout_type &layout, const void *const memory) const noexcept=0
 Pushes a block of memory into the push constants backing memory.
 
- Public Member Functions inherited from spark::render::ICommandBuffer
virtual void begin () const =0
 Sets the command buffer to recording state, allowing it to receive commands that should be transmitted to the CommandQueue.
 
virtual void end () const =0
 Ends the recording of the command buffer.
 
virtual bool isRecording () const noexcept=0
 Checks if the command buffer is recording.
 
virtual bool isSecondary () const noexcept=0
 Checks if the command buffer is a secondary command buffer.
 
void transfer (IBuffer &source, IBuffer &target, unsigned int source_element=0, unsigned int target_element=0, unsigned int elements=1) const
 Performs a buffer to buffer transfer from source to target.
 
void transfer (std::shared_ptr< IBuffer > source, IBuffer &target, unsigned int source_element=0, unsigned int target_element=0, unsigned int elements=1) const
 Performs a buffer to buffer transfer from source to target.
 
void transfer (IBuffer &source, IImage &target, unsigned int source_element=0, unsigned int first_subresource=0, unsigned int elements=1) const
 Performs a buffer to image transfer from source to target.
 
void transfer (std::shared_ptr< IBuffer > source, IImage &target, unsigned int source_element=0, unsigned int first_subresource=0, unsigned int elements=1) const
 Performs a buffer to image transfer from source to target.
 
void transfer (IImage &source, IImage &target, unsigned int source_subresource=0, unsigned int target_subresource=0, unsigned int subresources=1) const
 Performs an image to buffer transfer from source to target.
 
void transfer (std::shared_ptr< IImage > source, IImage &target, unsigned int source_subresource=0, unsigned int target_subresource=0, unsigned int subresources=1) const
 Performs an image to buffer transfer from source to target.
 
void transfer (IImage &source, IBuffer &target, unsigned int first_subresource=0, unsigned int target_element=0, unsigned int subresources=1) const
 Performs an image to buffer transfer from source to target.
 
void transfer (std::shared_ptr< IImage > source, IBuffer &target, unsigned int first_subresource=0, unsigned int target_element=0, unsigned int subresources=1) const
 Performs an image to buffer transfer from source to target.
 
void use (const IPipeline &pipeline) const noexcept
 Sets the pipeline to be used for subsequent draw calls.
 
void bind (const IDescriptorSet &descriptor_set) const
 Binds the descriptor_set to the last pipeline used by the command buffer.
 
void bind (const IDescriptorSet &descriptor_set, const IPipeline &pipeline) const noexcept
 Binds the descriptor_set to the pipeline.
 
void bind (const IVertexBuffer &vertex_buffer) const noexcept
 Binds the vertex_buffer to the pipeline.
 
void bind (const IIndexBuffer &index_buffer) const noexcept
 Binds the index_buffer to the pipeline.
 
void draw (unsigned int vertices, unsigned int instances=1, unsigned int first_vertex=0, unsigned int first_instance=0) const noexcept
 Draw a number of vertices from the currently bound vertex buffer.
 
void draw (const IVertexBuffer &vertex_buffer, unsigned int instances=1, unsigned int first_vertex=0, unsigned int first_instance=0) const noexcept
 Draw all vertices from the provided IVertexBuffer in vertex_buffer.
 
void drawIndexed (unsigned int indices, unsigned int instances=1, unsigned int first_index=0, int vertex_offset=0, unsigned int first_instance=0) const noexcept
 Draws the currently bound vertex buffer with a set of indices from the currently bound index buffer.
 
void drawIndexed (const IIndexBuffer &index_buffer, unsigned int instances=1, unsigned int first_index=0, int vertex_offset=0, unsigned int first_instance=0) const noexcept
 Draws the currently bound IVertexBuffer using the provided IIndexBuffer in index_buffer.
 
void drawIndexed (const IVertexBuffer &vertex_buffer, const IIndexBuffer &index_buffer, unsigned int instances=1, unsigned int first_index=0, int vertex_offset=0, unsigned int first_instance=0) const noexcept
 Draws the currently bound IVertexBuffer using the provided IIndexBuffer in index_buffer.
 
virtual void dispatch () const noexcept=0
 Executes a compute shader.
 
void execute (std::shared_ptr< const ICommandBuffer > command_buffer) const
 Executes a secondary command buffer.
 
void execute (const std::vector< std::shared_ptr< const ICommandBuffer > > &command_buffers) const
 Executes a series of secondary command buffers/bundles.
 
void pushConstants (const IPushConstantsLayout &layout, const void *const memory) const noexcept
 Pushes a block of memory into the push constants backing memory.
 
virtual void setViewport (const IViewport *viewport) const noexcept=0
 Sets the viewport to use for subsequent draw calls.
 
virtual void setViewports (std::span< const IViewport * > viewports) const noexcept=0
 Sets the viewports to use for subsequent draw calls.
 
virtual void setScissor (const IScissor *scissor) const noexcept=0
 Sets the scissor to use for subsequent draw calls.
 
virtual void setScissors (std::span< const IScissor * > scissors) const noexcept=0
 Sets the scissors to use for subsequent draw calls.
 
virtual void setBlendFactors (const math::Vector4< float > &blend_factors) const noexcept=0
 Sets the blend factors to use for subsequent draw calls.
 
virtual void setStencilRef (unsigned int stencil_ref) const noexcept=0
 Sets the stencil reference value to use for subsequent draw calls.
 
virtual void releaseSharedState () const =0
 Called by the parent command queue to signal that the command buffer should release it's shared state.
 

Detailed Description

template<typename CommandBufferType, typename BufferType, typename VertexBufferType, typename IndexBufferType, typename ImageType, typename PipelineType>
class spark::render::CommandBuffer< CommandBufferType, BufferType, VertexBufferType, IndexBufferType, ImageType, PipelineType >
Template Parameters
CommandBufferTypeType of the command buffer. (derived from ICommandBuffer)
BufferTypeType of the buffer. (derived from IBuffer)
VertexBufferTypeType of the vertex buffer. (derived from IVertexBuffer)
IndexBufferTypeType of the index buffer. (derived from IIndexBuffer)
ImageTypeType of the image. (derived from IImage)
PipelineTypeType of the pipeline. (derived from IPipeline)

Member Function Documentation

◆ bind() [1/4]

template<typename CommandBufferType , typename BufferType , typename VertexBufferType , typename IndexBufferType , typename ImageType , typename PipelineType >
virtual void spark::render::CommandBuffer< CommandBufferType, BufferType, VertexBufferType, IndexBufferType, ImageType, PipelineType >::bind ( const descriptor_set_type & descriptor_set) const
pure virtual

Binds the descriptor_set to the last pipeline used by the command buffer.

Parameters
descriptor_setThe IDescriptorSet to bind.
Exceptions
base::BadArgumentExceptionif the command buffer has not used a pipeline yet.

◆ bind() [2/4]

template<typename CommandBufferType , typename BufferType , typename VertexBufferType , typename IndexBufferType , typename ImageType , typename PipelineType >
virtual void spark::render::CommandBuffer< CommandBufferType, BufferType, VertexBufferType, IndexBufferType, ImageType, PipelineType >::bind ( const descriptor_set_type & descriptor_set,
const pipeline_type & pipeline ) const
pure virtualnoexcept

Binds the descriptor_set to the last pipeline used by the command buffer.

Parameters
descriptor_setThe IDescriptorSet to bind.
Exceptions
base::BadArgumentExceptionif the command buffer has not used a pipeline yet.

◆ bind() [3/4]

template<typename CommandBufferType , typename BufferType , typename VertexBufferType , typename IndexBufferType , typename ImageType , typename PipelineType >
virtual void spark::render::CommandBuffer< CommandBufferType, BufferType, VertexBufferType, IndexBufferType, ImageType, PipelineType >::bind ( const index_buffer_type & index_buffer) const
pure virtualnoexcept

Binds the descriptor_set to the last pipeline used by the command buffer.

Parameters
descriptor_setThe IDescriptorSet to bind.
Exceptions
base::BadArgumentExceptionif the command buffer has not used a pipeline yet.

◆ bind() [4/4]

template<typename CommandBufferType , typename BufferType , typename VertexBufferType , typename IndexBufferType , typename ImageType , typename PipelineType >
virtual void spark::render::CommandBuffer< CommandBufferType, BufferType, VertexBufferType, IndexBufferType, ImageType, PipelineType >::bind ( const vertex_buffer_type & vertex_buffer) const
pure virtualnoexcept

Binds the descriptor_set to the last pipeline used by the command buffer.

Parameters
descriptor_setThe IDescriptorSet to bind.
Exceptions
base::BadArgumentExceptionif the command buffer has not used a pipeline yet.

◆ draw() [1/2]

template<typename CommandBufferType , typename BufferType , typename VertexBufferType , typename IndexBufferType , typename ImageType , typename PipelineType >
virtual void spark::render::CommandBuffer< CommandBufferType, BufferType, VertexBufferType, IndexBufferType, ImageType, PipelineType >::draw ( const vertex_buffer_type & vertex_buffer,
unsigned instances,
unsigned first_vertex,
unsigned first_instance ) const
pure virtualnoexcept

Draw a number of vertices from the currently bound vertex buffer.

Parameters
verticesThe number of vertices to draw.
instancesThe number of instances to draw.
first_vertexThe index of the first vertex to draw.
first_instanceThe index of the first instance to draw.

◆ draw() [2/2]

template<typename CommandBufferType , typename BufferType , typename VertexBufferType , typename IndexBufferType , typename ImageType , typename PipelineType >
virtual void spark::render::CommandBuffer< CommandBufferType, BufferType, VertexBufferType, IndexBufferType, ImageType, PipelineType >::draw ( unsigned vertices,
unsigned instances,
unsigned first_vertex,
unsigned first_instance ) const
pure virtualnoexcept

Draw a number of vertices from the currently bound vertex buffer.

Parameters
verticesThe number of vertices to draw.
instancesThe number of instances to draw.
first_vertexThe index of the first vertex to draw.
first_instanceThe index of the first instance to draw.

Implemented in spark::render::vk::VulkanCommandBuffer.

◆ drawIndexed() [1/3]

template<typename CommandBufferType , typename BufferType , typename VertexBufferType , typename IndexBufferType , typename ImageType , typename PipelineType >
virtual void spark::render::CommandBuffer< CommandBufferType, BufferType, VertexBufferType, IndexBufferType, ImageType, PipelineType >::drawIndexed ( const index_buffer_type & index_buffer,
unsigned instances,
unsigned first_index,
int vertex_offset,
unsigned first_instance ) const
pure virtualnoexcept

Draws the currently bound vertex buffer with a set of indices from the currently bound index buffer.

Parameters
indicesThe number of indices to draw.
instancesThe number of instances to draw.
first_indexThe index of the first index to draw.
vertex_offsetThe offset to add to each index to find the vertex to draw.
first_instanceThe index of the first instance to draw.

◆ drawIndexed() [2/3]

template<typename CommandBufferType , typename BufferType , typename VertexBufferType , typename IndexBufferType , typename ImageType , typename PipelineType >
virtual void spark::render::CommandBuffer< CommandBufferType, BufferType, VertexBufferType, IndexBufferType, ImageType, PipelineType >::drawIndexed ( const vertex_buffer_type & vertex_buffer,
const index_buffer_type & index_buffer,
unsigned instances,
unsigned first_index,
int vertex_offset,
unsigned first_instance ) const
pure virtualnoexcept

Draws the currently bound vertex buffer with a set of indices from the currently bound index buffer.

Parameters
indicesThe number of indices to draw.
instancesThe number of instances to draw.
first_indexThe index of the first index to draw.
vertex_offsetThe offset to add to each index to find the vertex to draw.
first_instanceThe index of the first instance to draw.

◆ drawIndexed() [3/3]

template<typename CommandBufferType , typename BufferType , typename VertexBufferType , typename IndexBufferType , typename ImageType , typename PipelineType >
virtual void spark::render::CommandBuffer< CommandBufferType, BufferType, VertexBufferType, IndexBufferType, ImageType, PipelineType >::drawIndexed ( unsigned indices,
unsigned instances,
unsigned first_index,
int vertex_offset,
unsigned first_instance ) const
pure virtualnoexcept

Draws the currently bound vertex buffer with a set of indices from the currently bound index buffer.

Parameters
indicesThe number of indices to draw.
instancesThe number of instances to draw.
first_indexThe index of the first index to draw.
vertex_offsetThe offset to add to each index to find the vertex to draw.
first_instanceThe index of the first instance to draw.

Implemented in spark::render::vk::VulkanCommandBuffer.

◆ execute() [1/2]

template<typename CommandBufferType , typename BufferType , typename VertexBufferType , typename IndexBufferType , typename ImageType , typename PipelineType >
virtual void spark::render::CommandBuffer< CommandBufferType, BufferType, VertexBufferType, IndexBufferType, ImageType, PipelineType >::execute ( const std::vector< std::shared_ptr< const command_buffer_type > > & command_buffers) const
pure virtual

Executes a secondary command buffer.

Parameters
command_bufferThe secondary command buffer to execute.

◆ execute() [2/2]

template<typename CommandBufferType , typename BufferType , typename VertexBufferType , typename IndexBufferType , typename ImageType , typename PipelineType >
virtual void spark::render::CommandBuffer< CommandBufferType, BufferType, VertexBufferType, IndexBufferType, ImageType, PipelineType >::execute ( std::shared_ptr< const command_buffer_type > command_buffer) const
pure virtual

Executes a secondary command buffer.

Parameters
command_bufferThe secondary command buffer to execute.

◆ pushConstants()

template<typename CommandBufferType , typename BufferType , typename VertexBufferType , typename IndexBufferType , typename ImageType , typename PipelineType >
virtual void spark::render::CommandBuffer< CommandBufferType, BufferType, VertexBufferType, IndexBufferType, ImageType, PipelineType >::pushConstants ( const push_constants_layout_type & layout,
const void *const memory ) const
pure virtualnoexcept

Pushes a block of memory into the push constants backing memory.

Parameters
layoutThe IPushConstantsLayout to update.
memoryA pointer to the source memory.

◆ transfer() [1/8]

template<typename CommandBufferType , typename BufferType , typename VertexBufferType , typename IndexBufferType , typename ImageType , typename PipelineType >
virtual void spark::render::CommandBuffer< CommandBufferType, BufferType, VertexBufferType, IndexBufferType, ImageType, PipelineType >::transfer ( buffer_type & source,
buffer_type & target,
unsigned source_element,
unsigned target_element,
unsigned elements ) const
pure virtual

Performs a buffer to buffer transfer from source to target.

Parameters
sourceThe source buffer to transfer data from.
targetThe target buffer to transfer data to.
source_elementThe index of the first element to transfer from the source buffer.
target_elementThe index of the first element to transfer to the target buffer.
elementsThe number of elements to transfer.
Exceptions
spark::base::ArgumentOutOfRangeExceptionif the number of either the source or target buffers has not enough elements for the specified elements parameter.

◆ transfer() [2/8]

template<typename CommandBufferType , typename BufferType , typename VertexBufferType , typename IndexBufferType , typename ImageType , typename PipelineType >
virtual void spark::render::CommandBuffer< CommandBufferType, BufferType, VertexBufferType, IndexBufferType, ImageType, PipelineType >::transfer ( buffer_type & source,
image_type & target,
unsigned source_element,
unsigned first_subresource,
unsigned elements ) const
pure virtual

Performs a buffer to buffer transfer from source to target.

Parameters
sourceThe source buffer to transfer data from.
targetThe target buffer to transfer data to.
source_elementThe index of the first element to transfer from the source buffer.
target_elementThe index of the first element to transfer to the target buffer.
elementsThe number of elements to transfer.
Exceptions
spark::base::ArgumentOutOfRangeExceptionif the number of either the source or target buffers has not enough elements for the specified elements parameter.

◆ transfer() [3/8]

template<typename CommandBufferType , typename BufferType , typename VertexBufferType , typename IndexBufferType , typename ImageType , typename PipelineType >
virtual void spark::render::CommandBuffer< CommandBufferType, BufferType, VertexBufferType, IndexBufferType, ImageType, PipelineType >::transfer ( image_type & source,
buffer_type & target,
unsigned first_subresource,
unsigned target_element,
unsigned subresources ) const
pure virtual

Performs a buffer to buffer transfer from source to target.

Parameters
sourceThe source buffer to transfer data from.
targetThe target buffer to transfer data to.
source_elementThe index of the first element to transfer from the source buffer.
target_elementThe index of the first element to transfer to the target buffer.
elementsThe number of elements to transfer.
Exceptions
spark::base::ArgumentOutOfRangeExceptionif the number of either the source or target buffers has not enough elements for the specified elements parameter.

◆ transfer() [4/8]

template<typename CommandBufferType , typename BufferType , typename VertexBufferType , typename IndexBufferType , typename ImageType , typename PipelineType >
virtual void spark::render::CommandBuffer< CommandBufferType, BufferType, VertexBufferType, IndexBufferType, ImageType, PipelineType >::transfer ( image_type & source,
image_type & target,
unsigned source_subresource,
unsigned target_subresource,
unsigned subresources ) const
pure virtual

Performs a buffer to buffer transfer from source to target.

Parameters
sourceThe source buffer to transfer data from.
targetThe target buffer to transfer data to.
source_elementThe index of the first element to transfer from the source buffer.
target_elementThe index of the first element to transfer to the target buffer.
elementsThe number of elements to transfer.
Exceptions
spark::base::ArgumentOutOfRangeExceptionif the number of either the source or target buffers has not enough elements for the specified elements parameter.

◆ transfer() [5/8]

template<typename CommandBufferType , typename BufferType , typename VertexBufferType , typename IndexBufferType , typename ImageType , typename PipelineType >
virtual void spark::render::CommandBuffer< CommandBufferType, BufferType, VertexBufferType, IndexBufferType, ImageType, PipelineType >::transfer ( std::shared_ptr< buffer_type > source,
buffer_type & target,
unsigned source_element,
unsigned target_element,
unsigned elements ) const
pure virtual

Performs a buffer to buffer transfer from source to target.

Parameters
sourceThe source buffer to transfer data from.
targetThe target buffer to transfer data to.
source_elementThe index of the first element to transfer from the source buffer.
target_elementThe index of the first element to transfer to the target buffer.
elementsThe number of elements to transfer.
Exceptions
spark::base::ArgumentOutOfRangeExceptionif the number of either the source or target buffers has not enough elements for the specified elements parameter.

◆ transfer() [6/8]

template<typename CommandBufferType , typename BufferType , typename VertexBufferType , typename IndexBufferType , typename ImageType , typename PipelineType >
virtual void spark::render::CommandBuffer< CommandBufferType, BufferType, VertexBufferType, IndexBufferType, ImageType, PipelineType >::transfer ( std::shared_ptr< buffer_type > source,
image_type & target,
unsigned source_element,
unsigned first_subresource,
unsigned elements ) const
pure virtual

Performs a buffer to buffer transfer from source to target.

Parameters
sourceThe source buffer to transfer data from.
targetThe target buffer to transfer data to.
source_elementThe index of the first element to transfer from the source buffer.
target_elementThe index of the first element to transfer to the target buffer.
elementsThe number of elements to transfer.
Exceptions
spark::base::ArgumentOutOfRangeExceptionif the number of either the source or target buffers has not enough elements for the specified elements parameter.

◆ transfer() [7/8]

template<typename CommandBufferType , typename BufferType , typename VertexBufferType , typename IndexBufferType , typename ImageType , typename PipelineType >
virtual void spark::render::CommandBuffer< CommandBufferType, BufferType, VertexBufferType, IndexBufferType, ImageType, PipelineType >::transfer ( std::shared_ptr< image_type > source,
buffer_type & target,
unsigned int first_subresource,
unsigned int target_element,
unsigned int subresources ) const
pure virtual

Performs a buffer to buffer transfer from source to target.

Parameters
sourceThe source buffer to transfer data from.
targetThe target buffer to transfer data to.
source_elementThe index of the first element to transfer from the source buffer.
target_elementThe index of the first element to transfer to the target buffer.
elementsThe number of elements to transfer.
Exceptions
spark::base::ArgumentOutOfRangeExceptionif the number of either the source or target buffers has not enough elements for the specified elements parameter.

◆ transfer() [8/8]

template<typename CommandBufferType , typename BufferType , typename VertexBufferType , typename IndexBufferType , typename ImageType , typename PipelineType >
virtual void spark::render::CommandBuffer< CommandBufferType, BufferType, VertexBufferType, IndexBufferType, ImageType, PipelineType >::transfer ( std::shared_ptr< image_type > source,
image_type & target,
unsigned first_subresource,
unsigned target_element,
unsigned subresources ) const
pure virtual

Performs a buffer to buffer transfer from source to target.

Parameters
sourceThe source buffer to transfer data from.
targetThe target buffer to transfer data to.
source_elementThe index of the first element to transfer from the source buffer.
target_elementThe index of the first element to transfer to the target buffer.
elementsThe number of elements to transfer.
Exceptions
spark::base::ArgumentOutOfRangeExceptionif the number of either the source or target buffers has not enough elements for the specified elements parameter.

◆ use()

template<typename CommandBufferType , typename BufferType , typename VertexBufferType , typename IndexBufferType , typename ImageType , typename PipelineType >
virtual void spark::render::CommandBuffer< CommandBufferType, BufferType, VertexBufferType, IndexBufferType, ImageType, PipelineType >::use ( const pipeline_type & pipeline) const
pure virtualnoexcept

Sets the pipeline to be used for subsequent draw calls.

Parameters
pipelineA IPipeline object to use for subsequent draw calls.