Represents a command buffer, that buffers commands that should be submitted to a CommandQueue.
More...
|
virtual | ~CommandBuffer () noexcept=default |
|
virtual void | barrier (const barrier_type &barrier, const bool &invert=false) const noexcept=0 |
|
virtual void | generateMipMaps (image_type &image) noexcept=0 |
|
virtual void | transfer (const buffer_type &source, const buffer_type &target, const UInt32 &sourceElement=0, const UInt32 &targetElement=0, const UInt32 &elements=1) const =0 |
|
virtual void | transfer (const buffer_type &source, const image_type &target, const UInt32 &sourceElement=0, const UInt32 &firstSubresource=0, const UInt32 &elements=1) const =0 |
|
virtual void | transfer (const image_type &source, const image_type &target, const UInt32 &sourceSubresource=0, const UInt32 &targetSubresource=0, const UInt32 &subresources=1) const =0 |
|
virtual void | transfer (const image_type &source, const buffer_type &target, const UInt32 &firstSubresource=0, const UInt32 &targetElement=0, const UInt32 &subresources=1) const =0 |
|
virtual void | use (const pipeline_type &pipeline) const noexcept=0 |
|
virtual void | bind (const descriptor_set_type &descriptorSet, const pipeline_type &pipeline) const noexcept=0 |
|
virtual void | bind (const vertex_buffer_type &buffer) const noexcept=0 |
|
virtual void | bind (const index_buffer_type &buffer) const noexcept=0 |
|
virtual void | pushConstants (const push_constants_layout_type &layout, const void *const memory) const noexcept=0 |
|
virtual void | draw (const vertex_buffer_type &vertexBuffer, const UInt32 &instances=1, const UInt32 &firstVertex=0, const UInt32 &firstInstance=0) const |
|
virtual void | drawIndexed (const index_buffer_type &indexBuffer, const UInt32 &instances=1, const UInt32 &firstIndex=0, const Int32 &vertexOffset=0, const UInt32 &firstInstance=0) const |
|
virtual void | drawIndexed (const vertex_buffer_type &vertexBuffer, const index_buffer_type &indexBuffer, const UInt32 &instances=1, const UInt32 &firstIndex=0, const Int32 &vertexOffset=0, const UInt32 &firstInstance=0) const |
|
Public Member Functions inherited from LiteFX::Rendering::ICommandBuffer |
virtual | ~ICommandBuffer () noexcept=default |
|
virtual void | begin () const =0 |
| Sets the command buffer into recording state, so that it can receive command that should be submitted to the parent CommandQueue. More...
|
|
virtual void | end () const =0 |
| Ends recording commands on the command buffer. More...
|
|
void | barrier (const IBarrier &barrier, const bool &invert=false) const noexcept |
| Executes the transitions that have been added to barrier . More...
|
|
void | generateMipMaps (IImage &image) noexcept |
| Uses the image at level 0 to generate mip-maps for the remaining levels. More...
|
|
void | transfer (const IBuffer &source, const IBuffer &target, const UInt32 &sourceElement=0, const UInt32 &targetElement=0, const UInt32 &elements=1) const |
| Performs a buffer-to-buffer transfer from source to target . More...
|
|
void | transfer (const IBuffer &source, const IImage &target, const UInt32 &sourceElement=0, const UInt32 &firstSubresource=0, const UInt32 &elements=1) const |
| Performs a buffer-to-image transfer from source to target . More...
|
|
void | transfer (const IImage &source, const IImage &target, const UInt32 &sourceSubresource=0, const UInt32 &targetSubresource=0, const UInt32 &subresources=1) const |
| Performs an image-to-image transfer from source to target . More...
|
|
void | transfer (const IImage &source, const IBuffer &target, const UInt32 &firstSubresource=0, const UInt32 &targetElement=0, const UInt32 &subresources=1) const |
| Performs an image-to-buffer transfer from source to target . More...
|
|
void | use (const IPipeline &pipeline) const noexcept |
| Sets the active pipeline state. More...
|
|
void | bind (const IDescriptorSet &descriptorSet, const IPipeline &pipeline) const noexcept |
| Binds the provided descriptor set to the provided pipeline. More...
|
|
void | bind (const IVertexBuffer &buffer) const noexcept |
| Binds a vertex buffer to the pipeline. More...
|
|
void | bind (const IIndexBuffer &buffer) const noexcept |
| Binds a index buffer to the pipeline. More...
|
|
virtual void | dispatch (const Vector3u &threadCount) const noexcept=0 |
| Executes a compute shader. More...
|
|
virtual void | draw (const UInt32 &vertices, const UInt32 &instances=1, const UInt32 &firstVertex=0, const UInt32 &firstInstance=0) const noexcept=0 |
| Draws a number of vertices from the currently bound vertex buffer. More...
|
|
virtual void | drawIndexed (const UInt32 &indices, const UInt32 &instances=1, const UInt32 &firstIndex=0, const Int32 &vertexOffset=0, const UInt32 &firstInstance=0) const noexcept=0 |
| Draws the currently bound vertex buffer with a set of indices from the currently bound index buffer. More...
|
|
void | pushConstants (const IPushConstantsLayout &layout, const void *const memory) const noexcept |
| Pushes a block of memory into the push constants backing memory. More...
|
|
void | draw (const IVertexBuffer &vertexBuffer, const UInt32 &instances=1, const UInt32 &firstVertex=0, const UInt32 &firstInstance=0) const |
| Draws all vertices from the vertex buffer provided in vertexBuffer . More...
|
|
void | drawIndexed (const IIndexBuffer &indexBuffer, const UInt32 &instances=1, const UInt32 &firstIndex=0, const Int32 &vertexOffset=0, const UInt32 &firstInstance=0) const |
| Draws the currently bound vertex buffer using the index buffer provided in indexBuffer . More...
|
|
void | drawIndexed (const IVertexBuffer &vertexBuffer, const IIndexBuffer &indexBuffer, const UInt32 &instances=1, const UInt32 &firstIndex=0, const Int32 &vertexOffset=0, const UInt32 &firstInstance=0) const |
| Draws the vertex buffer provided by vertexBuffer using the index buffer, provided by indexBuffer . More...
|
|
template<typename TBuffer, typename TVertexBuffer, typename TIndexBuffer, typename TImage, typename TBarrier, typename TPipeline>
requires rtti::implements<TBarrier,
Barrier<TBuffer, TImage>> && std::derived_from<TPipeline,
Pipeline<typename TPipeline::pipeline_layout_type, typename TPipeline::shader_program_type>>
class LiteFX::Rendering::CommandBuffer< TBuffer, TVertexBuffer, TIndexBuffer, TImage, TBarrier, TPipeline >
Represents a command buffer, that buffers commands that should be submitted to a CommandQueue.
- Template Parameters
-
TBuffer | The generic buffer type. Must implement IBuffer. |
TVertexBuffer | The vertex buffer type. Must implement VertexBuffer. |
TIndexBuffer | The index buffer type. Must implement IndexBuffer. |
TImage | The generic image type. Must implement IImage. |
TBarrier | The barrier type. Must implement Barrier. |
TPipeline | The common pipeline interface type. Must be derived from Pipeline. |