![]() |
LiteFX 0.3.1.2022
Computer Graphics Engine
|
Interface for a swap chain. More...
#include <rendering_api.hpp>
Inherited by LiteFX::Rendering::SwapChain< IDirectX12Image, DirectX12FrameBuffer >, LiteFX::Rendering::SwapChain< IVulkanImage, VulkanFrameBuffer >, and LiteFX::Rendering::SwapChain< TImageInterface, TFrameBuffer >.
Public Member Functions | |
virtual | ~ISwapChain () noexcept=default |
virtual const Format & | surfaceFormat () const noexcept=0 |
Returns the swap chain image format. More... | |
virtual const UInt32 & | buffers () const noexcept=0 |
Returns the number of images in the swap chain. More... | |
virtual const Size2d & | renderArea () const noexcept=0 |
Returns the size of the render area. More... | |
Array< const IImage * > | images () const noexcept |
Returns an array of the swap chain present images. More... | |
virtual void | present (const IFrameBuffer &frameBuffer) const =0 |
Queues a present that gets executed after frameBuffer signals its readiness. More... | |
virtual Array< Format > | getSurfaceFormats () const noexcept=0 |
Returns an array of supported formats, that can be drawn to the surface. More... | |
virtual void | reset (const Format &surfaceFormat, const Size2d &renderArea, const UInt32 &buffers)=0 |
Causes the swap chain to be re-created. All frame and command buffers will be invalidated and rebuilt. More... | |
virtual UInt32 | swapBackBuffer () const =0 |
Swaps the front buffer with the next back buffer in order. More... | |
Interface for a swap chain.
|
virtualdefaultnoexcept |
|
pure virtualnoexcept |
Returns the number of images in the swap chain.
Implemented in LiteFX::Rendering::Backends::DirectX12SwapChain, and LiteFX::Rendering::Backends::VulkanSwapChain.
|
pure virtualnoexcept |
Returns an array of supported formats, that can be drawn to the surface.
surface
Implemented in LiteFX::Rendering::Backends::DirectX12SwapChain, and LiteFX::Rendering::Backends::VulkanSwapChain.
Returns an array of the swap chain present images.
|
pure virtual |
Queues a present that gets executed after frameBuffer signals its readiness.
frameBuffer | The frame buffer for which the present should wait. |
Implemented in LiteFX::Rendering::SwapChain< TImageInterface, TFrameBuffer >, LiteFX::Rendering::SwapChain< IDirectX12Image, DirectX12FrameBuffer >, and LiteFX::Rendering::SwapChain< IVulkanImage, VulkanFrameBuffer >.
|
pure virtualnoexcept |
Returns the size of the render area.
Implemented in LiteFX::Rendering::Backends::DirectX12SwapChain, and LiteFX::Rendering::Backends::VulkanSwapChain.
|
pure virtual |
Causes the swap chain to be re-created. All frame and command buffers will be invalidated and rebuilt.
There is no guarantee, that the swap chain images will end up in the exact format, as specified by surfaceFormat . If the format itself is not supported, a compatible format may be looked up. If the lookup fails, the method may raise an exception.
Similarly, it is not guaranteed, that the number of images returned by images matches the number specified in buffers . A swap chain may require a minimum number of images or may constraint a maximum number of images. In both cases, buffers will be clamped.
surfaceFormat | The swap chain image format. |
renderArea | The dimensions of the frame buffers. |
buffers | The number of buffers in the swap chain. |
Implemented in LiteFX::Rendering::Backends::DirectX12SwapChain, and LiteFX::Rendering::Backends::VulkanSwapChain.
|
pure virtualnoexcept |
Returns the swap chain image format.
Implemented in LiteFX::Rendering::Backends::DirectX12SwapChain, and LiteFX::Rendering::Backends::VulkanSwapChain.
|
pure virtual |
Swaps the front buffer with the next back buffer in order.
Implemented in LiteFX::Rendering::Backends::DirectX12SwapChain, and LiteFX::Rendering::Backends::VulkanSwapChain.