3#include "spark/render/Buffer.h"
4#include "spark/render/DescriptorSet.h"
5#include "spark/render/Export.h"
6#include "spark/render/Image.h"
7#include "spark/render/IndexBuffer.h"
8#include "spark/render/Pipeline.h"
9#include "spark/render/Scissor.h"
10#include "spark/render/VertexBuffer.h"
11#include "spark/render/Viewport.h"
13#include "spark/math/Vector4.h"
18namespace spark::render
40 virtual void end()
const = 0;
52 [[nodiscard]] virtual
bool isSecondary() const noexcept = 0;
64 void transfer(
IBuffer& source,
IBuffer& target,
unsigned int source_element = 0,
unsigned int target_element = 0,
unsigned int elements = 1)
const
66 genericTransfer(source, target, source_element, target_element, elements);
79 void transfer(std::shared_ptr<IBuffer> source,
IBuffer& target,
unsigned int source_element = 0,
unsigned int target_element = 0,
unsigned int elements = 1)
const
81 genericTransfer(source, target, source_element, target_element, elements);
100 void transfer(
IBuffer& source,
IImage& target,
unsigned int source_element = 0,
unsigned int first_subresource = 0,
unsigned int elements = 1)
const
102 genericTransfer(source, target, source_element, first_subresource, elements);
121 void transfer(std::shared_ptr<IBuffer> source,
IImage& target,
unsigned int source_element = 0,
unsigned int first_subresource = 0,
unsigned int elements = 1)
const
123 genericTransfer(source, target, source_element, first_subresource, elements);
137 void transfer(
IImage& source,
IImage& target,
unsigned int source_subresource = 0,
unsigned int target_subresource = 0,
unsigned int subresources = 1)
const
139 genericTransfer(source, target, source_subresource, target_subresource, subresources);
153 void transfer(std::shared_ptr<IImage> source,
IImage& target,
unsigned int source_subresource = 0,
unsigned int target_subresource = 0,
unsigned int subresources = 1)
const
155 genericTransfer(source, target, source_subresource, target_subresource, subresources);
179 void transfer(
IImage& source,
IBuffer& target,
unsigned int first_subresource = 0,
unsigned int target_element = 0,
unsigned int subresources = 1)
const
181 genericTransfer(source, target, first_subresource, target_element, subresources);
205 void transfer(std::shared_ptr<IImage> source,
IBuffer& target,
unsigned int first_subresource = 0,
unsigned int target_element = 0,
unsigned int subresources = 1)
const
207 genericTransfer(source, target, first_subresource, target_element, subresources);
214 void use(
const IPipeline& pipeline)
const noexcept { genericUse(pipeline); }
254 void draw(
unsigned int vertices,
unsigned int instances = 1,
unsigned int first_vertex = 0,
unsigned int first_instance = 0) const noexcept
256 genericDraw(vertices, instances, first_vertex, first_instance);
266 void draw(
const IVertexBuffer& vertex_buffer,
unsigned int instances = 1,
unsigned int first_vertex = 0,
unsigned int first_instance = 0) const noexcept
268 genericDraw(vertex_buffer, instances, first_vertex, first_instance);
279 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
281 genericDrawIndexed(indices, instances, first_index, vertex_offset, first_instance);
295 unsigned int instances = 1,
296 unsigned int first_index = 0,
297 int vertex_offset = 0,
298 unsigned int first_instance = 0) const noexcept { genericDrawIndexed(index_buffer, instances, first_index, vertex_offset, first_instance); }
311 unsigned int instances = 1,
312 unsigned int first_index = 0,
313 int vertex_offset = 0,
314 unsigned int first_instance = 0) const noexcept { genericDrawIndexed(vertex_buffer, index_buffer, instances, first_index, vertex_offset, first_instance); }
325 void execute(std::shared_ptr<const
ICommandBuffer> command_buffer)
const { genericExecute(command_buffer); }
331 void execute(
const std::vector<std::shared_ptr<const ICommandBuffer>>& command_buffers)
const { genericExecute(command_buffers); }
350 virtual void setViewports(std::span<const IViewport*> viewports)
const noexcept = 0;
362 virtual void setScissors(std::span<const IScissor*> scissors)
const noexcept = 0;
386 virtual void genericTransfer(
IBuffer& source,
388 unsigned int source_element = 0,
389 unsigned int target_element = 0,
390 unsigned int elements = 1) const noexcept = 0;
391 virtual
void genericTransfer(std::shared_ptr<
IBuffer> source,
393 unsigned int source_element = 0,
394 unsigned int target_element = 0,
395 unsigned int elements = 1) const = 0;
396 virtual
void genericTransfer(
IBuffer& source,
398 unsigned int source_element = 0,
399 unsigned int first_subresource = 0,
400 unsigned int elements = 1) const noexcept = 0;
401 virtual
void genericTransfer(std::shared_ptr<
IBuffer> source,
403 unsigned int source_element = 0,
404 unsigned int first_subresource = 0,
405 unsigned int elements = 1) const noexcept = 0;
406 virtual
void genericTransfer(
IImage& source,
408 unsigned int source_subresource = 0,
409 unsigned int target_subresource = 0,
410 unsigned int subresources = 1) const noexcept = 0;
411 virtual
void genericTransfer(std::shared_ptr<
IImage> source,
413 unsigned int source_subresource = 0,
414 unsigned int target_subresource = 0,
415 unsigned int subresources = 1) const noexcept = 0;
416 virtual
void genericTransfer(
IImage& source,
IBuffer& target,
unsigned int first_subresource = 0,
unsigned int target_element = 0,
unsigned int subresources = 1) const = 0;
417 virtual
void genericTransfer(std::shared_ptr<
IImage> source,
419 unsigned int first_subresource = 0,
420 unsigned int target_element = 0,
421 unsigned int subresources = 1) const noexcept = 0;
422 virtual
void genericUse(const
IPipeline& pipeline) const noexcept = 0;
423 virtual
void genericBind(const
IDescriptorSet& descriptor_set) const = 0;
425 virtual
void genericBind(const
IIndexBuffer& index_buffer) const noexcept = 0;
426 virtual
void genericBind(const
IVertexBuffer& vertex_buffer) const noexcept = 0;
427 virtual
void genericDraw(
unsigned int vertices,
unsigned int instances = 1,
unsigned int first_vertex = 0,
unsigned int first_instance = 0) const noexcept = 0;
428 virtual
void genericDraw(const
IVertexBuffer& vertex_buffer,
unsigned int instances = 1,
unsigned int first_vertex = 0,
unsigned int first_instance = 0) const noexcept = 0;
429 virtual
void genericDrawIndexed(
unsigned int indices,
430 unsigned int instances = 1,
431 unsigned int first_index = 0,
432 int vertex_offset = 0,
433 unsigned int first_instance = 0) const noexcept = 0;
434 virtual
void genericDrawIndexed(const
IIndexBuffer& index_buffer,
435 unsigned int instances = 1,
436 unsigned int first_index = 0,
437 int vertex_offset = 0,
438 unsigned int first_instance = 0) const noexcept = 0;
439 virtual
void genericDrawIndexed(const
IVertexBuffer& vertex_buffer,
441 unsigned int instances = 1,
442 unsigned int first_index = 0,
443 int vertex_offset = 0,
444 unsigned int first_instance = 0) const noexcept = 0;
445 virtual
void genericExecute(std::shared_ptr<const
ICommandBuffer> command_buffer) const = 0;
446 virtual
void genericExecute(const std::vector<std::shared_ptr<const
ICommandBuffer>>& command_buffers) const = 0;
447 virtual
void genericPushConstants(const
IPushConstantsLayout& layout, const
void* const memory) const noexcept = 0;
460 template <typename CommandBufferType, typename BufferType, typename VertexBufferType, typename IndexBufferType, typename ImageType, typename PipelineType>
464 using command_buffer_type = CommandBufferType;
465 using buffer_type = BufferType;
466 using vertex_buffer_type = VertexBufferType;
467 using index_buffer_type = IndexBufferType;
468 using image_type = ImageType;
469 using pipeline_type = PipelineType;
470 using pipeline_layout_type =
typename pipeline_type::pipeline_layout_type;
471 using descriptor_set_layout_type =
typename pipeline_layout_type::descriptor_set_layout_type;
472 using push_constants_layout_type =
typename pipeline_layout_type::push_constants_layout_type;
473 using descriptor_set_type =
typename descriptor_set_layout_type::descriptor_set_type;
477 virtual void transfer(buffer_type& source, buffer_type& target,
unsigned source_element,
unsigned target_element,
unsigned elements)
const = 0;
480 virtual void transfer(image_type& source, buffer_type& target,
unsigned first_subresource,
unsigned target_element,
unsigned subresources)
const = 0;
483 virtual void transfer(buffer_type& source, image_type& target,
unsigned source_element,
unsigned first_subresource,
unsigned elements)
const = 0;
486 virtual void transfer(image_type& source, image_type& target,
unsigned source_subresource,
unsigned target_subresource,
unsigned subresources)
const = 0;
489 virtual void transfer(std::shared_ptr<buffer_type> source, buffer_type& target,
unsigned source_element,
unsigned target_element,
unsigned elements)
const = 0;
492 virtual void transfer(std::shared_ptr<buffer_type> source, image_type& target,
unsigned source_element,
unsigned first_subresource,
unsigned elements)
const = 0;
495 virtual void transfer(std::shared_ptr<image_type> source, image_type& target,
unsigned first_subresource,
unsigned target_element,
unsigned subresources)
const = 0;
498 virtual void transfer(std::shared_ptr<image_type> source,
500 unsigned int first_subresource,
501 unsigned int target_element,
502 unsigned int subresources)
const = 0;
505 virtual void use(
const pipeline_type& pipeline)
const noexcept = 0;
508 virtual void bind(
const descriptor_set_type& descriptor_set)
const = 0;
511 virtual void bind(
const descriptor_set_type& descriptor_set,
const pipeline_type& pipeline)
const noexcept = 0;
514 virtual void bind(
const index_buffer_type& index_buffer)
const noexcept = 0;
517 virtual void bind(
const vertex_buffer_type& vertex_buffer)
const noexcept = 0;
520 virtual void draw(
unsigned vertices,
unsigned instances,
unsigned first_vertex,
unsigned first_instance)
const noexcept = 0;
523 virtual void draw(
const vertex_buffer_type& vertex_buffer,
unsigned instances,
unsigned first_vertex,
unsigned first_instance)
const noexcept = 0;
526 virtual void drawIndexed(
unsigned indices,
unsigned instances,
unsigned first_index,
int vertex_offset,
unsigned first_instance)
const noexcept = 0;
529 virtual void drawIndexed(
const index_buffer_type& index_buffer,
unsigned instances,
unsigned first_index,
int vertex_offset,
unsigned first_instance)
const noexcept = 0;
533 const index_buffer_type& index_buffer,
535 unsigned first_index,
537 unsigned first_instance)
const noexcept = 0;
540 virtual void execute(std::shared_ptr<const command_buffer_type> command_buffer)
const = 0;
543 virtual void execute(
const std::vector<std::shared_ptr<const command_buffer_type>>& command_buffers)
const = 0;
546 virtual void pushConstants(
const push_constants_layout_type& layout,
const void*
const memory)
const noexcept = 0;
549 void genericTransfer(
IBuffer& source,
IBuffer& target,
unsigned source_element,
unsigned target_element,
unsigned elements)
const noexcept final
551 transfer(
dynamic_cast<buffer_type&
>(source),
dynamic_cast<buffer_type&
>(target), source_element, target_element, elements);
554 void genericTransfer(std::shared_ptr<IBuffer> source,
IBuffer& target,
unsigned source_element,
unsigned target_element,
unsigned elements)
const final
556 transfer(std::dynamic_pointer_cast<buffer_type>(source),
dynamic_cast<buffer_type&
>(target), source_element, target_element, elements);
559 void genericTransfer(IBuffer& source, IImage& target,
unsigned source_element,
unsigned first_subresource,
unsigned elements)
const noexcept final
561 transfer(
dynamic_cast<buffer_type&
>(source),
dynamic_cast<image_type&
>(target), source_element, first_subresource, elements);
564 void genericTransfer(std::shared_ptr<IBuffer> source, IImage& target,
unsigned source_element,
unsigned first_subresource,
unsigned elements)
const noexcept final
566 transfer(std::dynamic_pointer_cast<buffer_type>(source),
dynamic_cast<image_type&
>(target), source_element, first_subresource, elements);
569 void genericTransfer(IImage& source, IImage& target,
unsigned source_subresource,
unsigned target_subresource,
unsigned subresources)
const noexcept final
571 transfer(
dynamic_cast<image_type&
>(source),
dynamic_cast<image_type&
>(target), source_subresource, target_subresource, subresources);
574 void genericTransfer(std::shared_ptr<IImage> source, IImage& target,
unsigned source_subresource,
unsigned target_subresource,
unsigned subresources)
const noexcept final
576 transfer(std::static_pointer_cast<image_type>(source),
dynamic_cast<image_type&
>(target), source_subresource, target_subresource, subresources);
579 void genericTransfer(IImage& source, IBuffer& target,
unsigned first_subresource,
unsigned target_element,
unsigned subresources)
const noexcept final
581 transfer(
dynamic_cast<image_type&
>(source),
dynamic_cast<buffer_type&
>(target), first_subresource, target_element, subresources);
584 void genericTransfer(std::shared_ptr<IImage> source, IBuffer& target,
unsigned first_subresource,
unsigned target_element,
unsigned subresources)
const noexcept final
586 transfer(std::static_pointer_cast<image_type>(source),
dynamic_cast<buffer_type&
>(target), first_subresource, target_element, subresources);
589 void genericUse(
const IPipeline& pipeline)
const noexcept final { use(
dynamic_cast<const pipeline_type&
>(pipeline)); }
590 void genericBind(
const IDescriptorSet& descriptor_set)
const final { bind(
dynamic_cast<const descriptor_set_type&
>(descriptor_set)); }
592 void genericBind(
const IDescriptorSet& descriptor_set,
const IPipeline& pipeline)
const noexcept final
594 bind(
dynamic_cast<const descriptor_set_type&
>(descriptor_set),
dynamic_cast<const pipeline_type&
>(pipeline));
597 void genericBind(
const IIndexBuffer& index_buffer)
const noexcept final { bind(
dynamic_cast<const index_buffer_type&
>(index_buffer)); }
598 void genericBind(
const IVertexBuffer& vertex_buffer)
const noexcept final { bind(
dynamic_cast<const vertex_buffer_type&
>(vertex_buffer)); }
600 void genericDraw(
unsigned vertices,
unsigned instances,
unsigned first_vertex,
unsigned first_instance)
const noexcept final
602 draw(vertices, instances, first_vertex, first_instance);
605 void genericDraw(
const IVertexBuffer& vertex_buffer,
unsigned instances,
unsigned first_vertex,
unsigned first_instance)
const noexcept final
607 draw(
dynamic_cast<const vertex_buffer_type&
>(vertex_buffer), instances, first_vertex, first_instance);
610 void genericDrawIndexed(
unsigned indices,
unsigned instances,
unsigned first_index,
int vertex_offset,
unsigned first_instance)
const noexcept final
612 drawIndexed(indices, instances, first_index, vertex_offset, first_instance);
615 void genericDrawIndexed(
const IIndexBuffer& index_buffer,
unsigned instances,
unsigned first_index,
int vertex_offset,
unsigned first_instance)
const noexcept final
617 drawIndexed(
dynamic_cast<const index_buffer_type&
>(index_buffer), instances, first_index, vertex_offset, first_instance);
620 void genericDrawIndexed(
const IVertexBuffer& vertex_buffer,
621 const IIndexBuffer& index_buffer,
623 unsigned first_index,
625 unsigned first_instance)
const noexcept final
627 drawIndexed(
dynamic_cast<const vertex_buffer_type&
>(vertex_buffer),
628 dynamic_cast<const index_buffer_type&
>(index_buffer),
635 void genericExecute(std::shared_ptr<const ICommandBuffer> command_buffer)
const final { execute(std::static_pointer_cast<const command_buffer_type>(command_buffer)); }
637 void genericExecute(
const std::vector<std::shared_ptr<const ICommandBuffer>>& command_buffers)
const final
639 std::vector<std::shared_ptr<const command_buffer_type>> command_buffer_types;
640 command_buffer_types.reserve(command_buffers.size());
641 std::ranges::transform(command_buffers,
642 std::back_inserter(command_buffer_types),
643 [](
const std::shared_ptr<const ICommandBuffer>& command_buffer) {
return std::static_pointer_cast<const command_buffer_type>(command_buffer); });
644 execute(command_buffer_types);
647 void genericPushConstants(
const IPushConstantsLayout& layout,
const void*
const memory)
const noexcept final
649 pushConstants(
dynamic_cast<const push_constants_layout_type&
>(layout), memory);
A vector with four components.
Definition Vector4.h:13
Definition CommandBuffer.h:462
virtual void execute(const std::vector< std::shared_ptr< const command_buffer_type > > &command_buffers) const =0
Executes a secondary 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 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 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 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(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 bind(const descriptor_set_type &descriptor_set) const =0
Binds the descriptor_set to the last pipeline used by the command buffer.
virtual void use(const pipeline_type &pipeline) const noexcept=0
Sets the pipeline to be used for subsequent draw calls.
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(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 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 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 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 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 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.
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(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< 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< 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 execute(std::shared_ptr< const command_buffer_type > command_buffer) const =0
Executes a secondary command buffer.
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.
Base interface for all buffers.
Definition Buffer.h:151
Interface for a command buffer.
Definition CommandBuffer.h:24
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.
Definition CommandBuffer.h:79
virtual void end() const =0
Ends the recording of the command buffer.
virtual void setBlendFactors(const math::Vector4< float > &blend_factors) const noexcept=0
Sets the blend factors to use for subsequent draw calls.
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.
Definition CommandBuffer.h:100
virtual void setScissor(const IScissor *scissor) const noexcept=0
Sets the scissor to use for subsequent draw calls.
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.
Definition CommandBuffer.h:309
void bind(const IDescriptorSet &descriptor_set) const
Binds the descriptor_set to the last pipeline used by the command buffer.
Definition CommandBuffer.h:222
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.
Definition CommandBuffer.h:254
void bind(const IDescriptorSet &descriptor_set, const IPipeline &pipeline) const noexcept
Binds the descriptor_set to the pipeline.
Definition CommandBuffer.h:229
void bind(const IVertexBuffer &vertex_buffer) const noexcept
Binds the vertex_buffer to the pipeline.
Definition CommandBuffer.h:237
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.
Definition CommandBuffer.h:266
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.
Definition CommandBuffer.h:205
virtual void setScissors(std::span< const IScissor * > scissors) const noexcept=0
Sets the scissors to use for subsequent draw calls.
void pushConstants(const IPushConstantsLayout &layout, const void *const memory) const noexcept
Pushes a block of memory into the push constants backing memory.
Definition CommandBuffer.h:338
virtual void setViewports(std::span< const IViewport * > viewports) const noexcept=0
Sets the viewports to use for subsequent draw calls.
virtual void begin() const =0
Sets the command buffer to recording state, allowing it to receive commands that should be transmitte...
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.
Definition CommandBuffer.h:294
virtual void setViewport(const IViewport *viewport) const noexcept=0
Sets the viewport to use for subsequent draw calls.
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.
Definition CommandBuffer.h:137
virtual void dispatch() const noexcept=0
Executes a compute shader.
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.
Definition CommandBuffer.h:153
virtual bool isRecording() const noexcept=0
Checks if the command buffer is recording.
void bind(const IIndexBuffer &index_buffer) const noexcept
Binds the index_buffer to the pipeline.
Definition CommandBuffer.h:245
void use(const IPipeline &pipeline) const noexcept
Sets the pipeline to be used for subsequent draw calls.
Definition CommandBuffer.h:214
virtual void setStencilRef(unsigned int stencil_ref) const noexcept=0
Sets the stencil reference value to use for subsequent draw calls.
void execute(const std::vector< std::shared_ptr< const ICommandBuffer > > &command_buffers) const
Executes a series of secondary command buffers/bundles.
Definition CommandBuffer.h:331
virtual void releaseSharedState() const =0
Called by the parent command queue to signal that the command buffer should release it's shared state...
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.
Definition CommandBuffer.h:179
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.
Definition CommandBuffer.h:121
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.
Definition CommandBuffer.h:279
Interface for a descriptor set.
Definition DescriptorSet.h:103
Describes an index buffer.
Definition IndexBuffer.h:39
Interface representing a pipeline.
Definition Pipeline.h:82
Interface for a push constants layout.
Definition PushConstantsLayout.h:15
Interface representing a scissor.
Definition Scissor.h:15
Represents a vertex buffer.
Definition VertexBuffer.h:35
Interface representing a viewport.
Definition Viewport.h:15