|
virtual unsigned int | bufferIndex () const noexcept=0 |
| Gets the index of the frame buffer within the IRenderPass.
|
|
virtual spark::math::Vector2< unsigned > | size () const noexcept=0 |
| Gets the current size of the frame buffer.
|
|
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 .
|
|
virtual void | resize (const spark::math::Vector2< unsigned > &render_area)=0 |
| Invalidate and resize the frame buffer with given render_area .
|
|
Interface for a frame buffer.
virtual unsigned int spark::render::IFrameBuffer::bufferIndex |
( |
| ) |
const |
|
nodiscardpure virtualnoexcept |
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).
Implemented in spark::render::vk::VulkanFrameBuffer.
virtual void spark::render::IFrameBuffer::resize |
( |
const spark::math::Vector2< unsigned > & | render_area | ) |
|
|
pure virtual |
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.
Implemented in spark::render::vk::VulkanFrameBuffer.