LiteFX 0.3.1.2022
Computer Graphics Engine
|
The interface for a frame buffer. More...
#include <rendering_api.hpp>
Inherited by LiteFX::Rendering::FrameBuffer< DirectX12CommandBuffer >, LiteFX::Rendering::FrameBuffer< VulkanCommandBuffer >, and LiteFX::Rendering::FrameBuffer< TCommandBuffer >.
Public Member Functions | |
virtual | ~IFrameBuffer () noexcept=default |
virtual const UInt32 & | bufferIndex () const noexcept=0 |
Returns the index of the buffer within the RenderPass. More... | |
virtual const Size2d & | size () const noexcept=0 |
Returns the current size of the frame buffer. More... | |
virtual size_t | getWidth () const noexcept=0 |
Returns the current width of the frame buffer. More... | |
virtual size_t | getHeight () const noexcept=0 |
Returns the current height of the frame buffer. More... | |
Array< const ICommandBuffer * > | commandBuffers () const noexcept |
Returns all command buffers, the frame buffer stores. More... | |
virtual const ICommandBuffer & | commandBuffer (const UInt32 &index) const =0 |
Returns a command buffer that records draw commands for the frame buffer. More... | |
Array< const IImage * > | images () const noexcept |
Returns the images that store the output attachments for the render targets of the RenderPass. More... | |
virtual const IImage & | image (const UInt32 &location) const =0 |
Returns the image that stores the output attachment for the render target mapped the location passed with location . More... | |
virtual void | resize (const Size2d &renderArea)=0 |
Causes the frame buffer to be invalidated and recreated with a new size. More... | |
The interface for a frame buffer.
|
virtualdefaultnoexcept |
|
pure virtualnoexcept |
Returns the index of the buffer within the RenderPass.
A render pass stores multiple frame buffers, each with their own index. Calling RenderPass::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 LiteFX::Rendering::Backends::DirectX12FrameBuffer, and LiteFX::Rendering::Backends::VulkanFrameBuffer.
|
pure virtual |
Returns a command buffer that records draw commands for the frame buffer.
index | The index of the command buffer. |
ArgumentOutOfRangeException | Thrown, if the frame buffer does not store a command buffer at index . |
Implemented in LiteFX::Rendering::FrameBuffer< TCommandBuffer >, LiteFX::Rendering::Backends::DirectX12FrameBuffer, LiteFX::Rendering::Backends::VulkanFrameBuffer, LiteFX::Rendering::FrameBuffer< DirectX12CommandBuffer >, and LiteFX::Rendering::FrameBuffer< VulkanCommandBuffer >.
|
inlinenoexcept |
Returns all command buffers, the frame buffer stores.
|
pure virtualnoexcept |
Returns the current height of the frame buffer.
Implemented in LiteFX::Rendering::Backends::DirectX12FrameBuffer, and LiteFX::Rendering::Backends::VulkanFrameBuffer.
|
pure virtualnoexcept |
Returns the current width of the frame buffer.
Implemented in LiteFX::Rendering::Backends::DirectX12FrameBuffer, and LiteFX::Rendering::Backends::VulkanFrameBuffer.
|
pure virtual |
Returns the image that stores the output attachment for the render target mapped the location passed with location .
Implemented in LiteFX::Rendering::FrameBuffer< TCommandBuffer >, LiteFX::Rendering::Backends::DirectX12FrameBuffer, LiteFX::Rendering::Backends::VulkanFrameBuffer, LiteFX::Rendering::FrameBuffer< DirectX12CommandBuffer >, and LiteFX::Rendering::FrameBuffer< VulkanCommandBuffer >.
Returns the images that store the output attachments for the render targets of the RenderPass.
|
pure virtual |
Causes the frame buffer to be invalidated and recreated with a new size.
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. Note that 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.
renderArea | The new dimensions of the frame buffer. |
Implemented in LiteFX::Rendering::Backends::DirectX12FrameBuffer, and LiteFX::Rendering::Backends::VulkanFrameBuffer.
|
pure virtualnoexcept |
Returns the current size of the frame buffer.
Implemented in LiteFX::Rendering::Backends::DirectX12FrameBuffer, and LiteFX::Rendering::Backends::VulkanFrameBuffer.