Abstract interface for the platform-specific swapchain. More...
#include <Swapchain.h>
Inherits Raven::RefCounted.
Inherited by Raven::VulkanSwapchain.
Public Member Functions | |
| virtual | ~Swapchain ()=default |
| virtual void | Shutdown ()=0 |
| Cleans up and releases all resources associated with the swapchain. | |
| virtual void | Present ()=0 |
| Presents the current backbuffer to the display. | |
| virtual void | BeginFrame ()=0 |
| virtual void | Recreate (u32 width, u32 height, bool enabled)=0 |
| Recreates the swapchain buffers to the specified dimensions. | |
| virtual float | GetAspectRatio () const =0 |
| Returns the aspect ratio (width / height) of the swapchain. | |
| virtual void * | GetFence () const =0 |
| virtual void * | GetFence (const u32 frame) const =0 |
| Public Member Functions inherited from Raven::RefCounted | |
| RefCounted () | |
| virtual | ~RefCounted () |
| void | IncRefCount () |
| void | DecRefCount () |
| u32 | GetRefCount () const |
Static Public Member Functions | |
| static Ref< Swapchain > | Create (u32 width, u32 height, bool vsync) |
| Factory method to create a platform-specific swapchain instance. | |
Abstract interface for the platform-specific swapchain.
Responsible for presenting rendered images to the display, managing the swapchain buffers, handling resizing events, and controlling VSync behavior.
|
virtualdefault |
|
pure virtual |
Implemented in Raven::VulkanSwapchain.
Factory method to create a platform-specific swapchain instance.
| width | Pointer to initial width; updated if swapchain decides to override. |
| height | Pointer to initial height; updated if swapchain decides to override. |
| vsync | Initial VSync enabled/disabled state. |
|
pure virtual |
Returns the aspect ratio (width / height) of the swapchain.
Useful for configuring projection matrices and viewport settings.
Implemented in Raven::VulkanSwapchain.
|
pure virtual |
Implemented in Raven::VulkanSwapchain.
|
pure virtual |
Implemented in Raven::VulkanSwapchain.
|
pure virtual |
Presents the current backbuffer to the display.
Synchronizes with the display refresh rate depending on VSync settings.
Implemented in Raven::VulkanSwapchain.
|
pure virtual |
Recreates the swapchain buffers to the specified dimensions.
Typically called when the window size changes.
| width | New width of the swapchain. |
| height | New height of the swapchain. |
| enabled | Enables/Disables VSync |
Implemented in Raven::VulkanSwapchain.
|
pure virtual |
Cleans up and releases all resources associated with the swapchain.
Implemented in Raven::VulkanSwapchain.