SPARK
0.1.0
A general purpose game engine written in C++.
|
Vulkan implementation of IRenderPass. More...
#include <VulkanRenderPass.h>
Classes | |
struct | Impl |
Public Member Functions | |
VulkanRenderPass (const VulkanDevice &device, std::span< RenderTarget > render_targets, unsigned command_buffers=1, MultiSamplingLevel samples=MultiSamplingLevel::X1, std::span< VulkanInputAttachmentMapping > input_attachments={}) | |
Initializes a VulkanRenderPass. | |
VulkanRenderPass (const VulkanDevice &device, const std::string &name, std::span< RenderTarget > render_targets, unsigned command_buffers=1, MultiSamplingLevel samples=MultiSamplingLevel::X1, std::span< VulkanInputAttachmentMapping > input_attachments={}) | |
Initializes a VulkanRenderPass. | |
VulkanRenderPass (const VulkanRenderPass &other)=delete | |
VulkanRenderPass (VulkanRenderPass &&other) noexcept=delete | |
VulkanRenderPass & | operator= (const VulkanRenderPass &other)=delete |
VulkanRenderPass & | operator= (VulkanRenderPass &&other) noexcept=delete |
const VulkanDevice & | device () const noexcept |
Gets the parent VulkanDevice that provides the queue. | |
void | begin (unsigned buffer) override |
Begins the render pass. | |
void | end () const override |
Ends the render pass. | |
const VulkanFrameBuffer & | activeFrameBuffer () const override |
Gets the active frame buffer from the render pass. | |
const VulkanFrameBuffer & | frameBuffer (unsigned buffer) const override |
Gets the frame buffer with the index provided in buffer . | |
std::vector< const VulkanFrameBuffer * > | frameBuffers () const noexcept override |
Gets all frame buffers owned by the render pass. | |
void | resizeFrameBuffers (const math::Vector2< unsigned > &new_render_area) override |
Resets the frame buffers owned by the render pass. | |
std::vector< const VulkanRenderPipeline * > | pipelines () const noexcept override |
Gets all render pipelines owned by the render pass. | |
const RenderTarget & | renderTarget (unsigned location) const override |
Gets the render target at the specified location . | |
std::span< const RenderTarget > | renderTargets () const noexcept override |
Gets all render targets the render pass is rendering to. | |
bool | hasPresentRenderTarget () const noexcept override |
Checks if one of the render targets is used for presentation in a ISwapChain. | |
MultiSamplingLevel | multiSamplingLevel () const noexcept override |
Gets the number of samples the render targets are sampled with. | |
std::span< const VulkanInputAttachmentMapping > | inputAttachments () const noexcept override |
Gets the input attachments the render pass is consuming. | |
void | updateAttachments (const VulkanDescriptorSet &descriptor_set) const override |
Resolves the input attachments mapped to the render pass and updates them on the descriptor set provided with descriptor_set . | |
![]() | |
virtual void | updateAttachments (const descriptor_set_type &descriptor_set) const=0 |
Resolves the input attachments mapped to the render pass and updates them on the descriptor set provided with descriptor_set . | |
![]() | |
StateResource (std::string_view name) noexcept | |
Initializes a new StateResource instance. | |
StateResource (const StateResource &other)=delete | |
StateResource (StateResource &&other) noexcept | |
StateResource & | operator= (const StateResource &other)=delete |
StateResource & | operator= (StateResource &&other) noexcept |
const std::string & | name () const noexcept final |
Gets the name of the state resource. | |
![]() | |
virtual void | begin (unsigned int buffer)=0 |
Begins the render pass. | |
const IFrameBuffer & | activeFrameBuffer () const |
Gets the active frame buffer from the render pass. | |
std::vector< const IFrameBuffer * > | frameBuffers () const noexcept |
Gets all frame buffers owned by the render pass. | |
virtual void | resizeFrameBuffers (const math::Vector2< unsigned int > &new_render_area)=0 |
Resets the frame buffers owned by the render pass. | |
std::vector< const IRenderPipeline * > | pipelines () const noexcept |
Gets all render pipelines owned by the render pass. | |
virtual const RenderTarget & | renderTarget (unsigned int location) const =0 |
Gets the render target at the specified location . | |
void | updateAttachments (const IDescriptorSet &descriptor_set) const |
Resolves the input attachments mapped to the render pass and updates them on the descriptor set provided with descriptor_set . | |
![]() | |
Resource (VkRenderPass handle) noexcept | |
Initializes the managed resource with the given handle. | |
Resource (const Resource &other)=delete | |
Resource (Resource &&other) noexcept=delete | |
Resource & | operator= (const Resource &other)=delete |
Resource & | operator= (Resource &&other) noexcept=delete |
const VkRenderPass & | handle () const final |
Gets the managed resource handle. | |
Additional Inherited Members | |
![]() | |
using | frame_buffer_type |
using | render_pipeline_type |
using | input_attachment_mapping_type |
using | pipeline_layout_type |
using | descriptor_set_layout_type |
using | descriptor_set_type |
![]() | |
using | FrameBuffer |
![]() | |
using | handle_type |
![]() | |
StateResource () noexcept | |
Initializes a new StateResource instance with an empty name. | |
std::string & | name () noexcept |
Gets the name of the state resource. | |
![]() | |
VkRenderPass & | handle () final |
Gets the managed resource handle. | |
Vulkan implementation of IRenderPass.
|
explicit |
Initializes a VulkanRenderPass.
device | The parent VulkanDevice instance. |
render_targets | The render targets that are output by the IRenderPass. |
command_buffers | The number of ICommandBuffer in each IFrameBuffer. |
samples | The number of samples to use for multi sampling. |
input_attachments | The input attachments that are read in the IRenderPass. |
|
explicit |
Initializes a VulkanRenderPass.
device | The parent VulkanDevice instance. |
name | The name of the VulkanRenderPass state resource. |
render_targets | The render targets that are output by the IRenderPass. |
command_buffers | The number of ICommandBuffer in each IFrameBuffer. |
samples | The number of samples to use for multi sampling. |
input_attachments | The input attachments that are read in the IRenderPass. |
|
nodiscardoverridevirtual |
Gets the active frame buffer from the render pass.
k2::base::RenderPassNotStartedException | if the render pass has not been started. |
Implements spark::render::RenderPass< VulkanRenderPipeline, VulkanFrameBuffer, VulkanInputAttachmentMapping >.
|
override |
Begins the render pass.
buffer | The index of the back buffer to render to. Typically, the values returned by ISwapChain::swapBackBuffer() is used. |
base::RenderPassAlreadyStartedException | if the render pass has already been started. |
base::ArgumentOutOfRangeException | if buffer is out of range. |
|
nodiscardnoexcept |
Gets the parent VulkanDevice that provides the queue.
|
overridevirtual |
Ends the render pass.
base::RenderPassNotStartedException | if the render pass has not been started. |
Implements spark::render::IRenderPass.
|
nodiscardoverridevirtual |
Gets the frame buffer with the index provided in buffer
.
buffer
.base::ArgumentOutOfRangeException | if buffer does not maps to a valid frame buffer. |
Implements spark::render::InputAttachmentMappingSource< VulkanFrameBuffer >.
|
nodiscardoverridevirtualnoexcept |
Gets all frame buffers owned by the render pass.
Implements spark::render::RenderPass< VulkanRenderPipeline, VulkanFrameBuffer, VulkanInputAttachmentMapping >.
|
nodiscardoverridevirtualnoexcept |
Checks if one of the render targets is used for presentation in a ISwapChain.
true
if one of the render targets is used for presentation in a ISwapChain, false
otherwise. Implements spark::render::IRenderPass.
|
nodiscardoverridevirtualnoexcept |
Gets the input attachments the render pass is consuming.
Implements spark::render::RenderPass< VulkanRenderPipeline, VulkanFrameBuffer, VulkanInputAttachmentMapping >.
|
nodiscardoverridevirtualnoexcept |
Gets the number of samples the render targets are sampled with.
Implements spark::render::IRenderPass.
|
nodiscardoverridevirtualnoexcept |
Gets all render pipelines owned by the render pass.
Implements spark::render::RenderPass< VulkanRenderPipeline, VulkanFrameBuffer, VulkanInputAttachmentMapping >.
|
nodiscardoverride |
Gets the render target at the specified location
.
location | The location of the render target to get. |
location
.
|
nodiscardoverridevirtualnoexcept |
Gets all render targets the render pass is rendering to.
Implements spark::render::IRenderPass.
|
override |
Resets the frame buffers owned by the render pass.
new_render_area | The size of the render area the frame buffers should be resized to. |
|
override |
Resolves the input attachments mapped to the render pass and updates them on the descriptor set provided with descriptor_set
.
descriptor_set | The IDescriptorSet to update the input attachments on. |