|
| VulkanFrameBuffer (const VulkanRenderPass &render_pass, unsigned buffer_index, const math::Vector2< unsigned > &render_area, unsigned command_buffers=1) |
| Initializes a new VulkanFrameBuffer.
|
|
| VulkanFrameBuffer (const VulkanFrameBuffer &other)=delete |
|
| VulkanFrameBuffer (VulkanFrameBuffer &&other) noexcept=delete |
|
VulkanFrameBuffer & | operator= (const VulkanFrameBuffer &other)=delete |
|
VulkanFrameBuffer & | operator= (VulkanFrameBuffer &&other) noexcept=delete |
|
const VkSemaphore & | semaphore () const noexcept |
| Gets a reference of the semaphore, that can be used to signal, that the frame buffer is finished.
|
|
std::size_t & | lastFence () const noexcept |
| Gets a reference of the last fence value for the frame buffer.
|
|
unsigned | bufferIndex () const noexcept override |
| Gets the index of the frame buffer within the IRenderPass.
|
|
spark::math::Vector2< unsigned > | size () const noexcept override |
| Gets the current size of the frame buffer.
|
|
void | resize (const spark::math::Vector2< unsigned > &render_area) override |
| Invalidate and resize the frame buffer with given render_area .
|
|
std::vector< std::shared_ptr< const VulkanCommandBuffer > > | commandBuffers () const noexcept override |
| Gets all command buffers of the frame buffer.
|
|
std::shared_ptr< const VulkanCommandBuffer > | commandBuffer (unsigned index) const override |
| Gets the command buffer that records draw commands for the frame buffer.
|
|
std::vector< const IVulkanImage * > | images () const noexcept override |
| Gets all images storing the output attachments for the render targets of the IRenderPass.
|
|
const IVulkanImage & | image (unsigned location) const override |
| Gets the image storing the output attachment for the render target mapped at given location .
|
|
std::vector< std::shared_ptr< const ICommandBuffer > > | commandBuffers () const noexcept |
| Gets all command buffers of the frame buffer.
|
|
std::shared_ptr< const ICommandBuffer > | commandBuffer (unsigned int index) const |
| Gets the command buffer that records draw commands for the frame buffer.
|
|
std::vector< const IImage * > | images () const noexcept |
| Gets all images storing the output attachments for the render targets of the IRenderPass.
|
|
const IImage & | image (unsigned int location) const |
| Gets the image storing the output attachment for the render target mapped at given location .
|
|
| Resource (VkFramebuffer 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 VkFramebuffer & | handle () const final |
| Gets the managed resource handle.
|
|
Vulkan implementation of IFrameBuffer.
unsigned spark::render::vk::VulkanFrameBuffer::bufferIndex |
( |
| ) |
const |
|
nodiscardoverridevirtualnoexcept |
Gets the index of the frame buffer within the IRenderPass.
- Returns
- The index of the frame buffer within the IRenderPass.
A render pass stores multiple frame buffers, each with their own index. Calling IRenderPass::frameBuffer() with this index on the frame buffers render pass returns the current frame buffer instance (i.e. the same instance, as the one, the index has been requested from).
Implements spark::render::IFrameBuffer.
void spark::render::vk::VulkanFrameBuffer::resize |
( |
const spark::math::Vector2< unsigned > & | render_area | ) |
|
|
overridevirtual |
Invalidate and resize the frame buffer with given render_area
.
- Parameters
-
render_area | The new size of the frame buffer. |
A frame buffer resize causes all render target resources (i.e. images) to be re-created. This is done by the implementation itself, except for present targets, which require a view of an image created on a ISwapChain. If the frame buffer has a present target, it calls ISwapChain::images() on the parent devices' swap chain.
- Warning
- There should only be one render pass, that contains present targets, otherwise the images are written by different render passes, which may result in undefined behavior.
Implements spark::render::IFrameBuffer.