![]() |
Raven Engine v0.1
|
Abstract interface for the platform-specific swapchain. More...
#include <Swapchain.h>
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 | Resize (u32 width, u32 height)=0 |
| Resizes the swapchain buffers to the specified dimensions. | |
| virtual void | SetVSync (bool enabled)=0 |
| Enables or disables vertical synchronization (VSync). | |
| virtual float | GetAspectRatio () const =0 |
| Returns the aspect ratio (width / height) of the swapchain. | |
| virtual void * | GetFence () const =0 |
Static Public Member Functions | |
| static Scope< 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 |
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 |
Presents the current backbuffer to the display.
Synchronizes with the display refresh rate depending on VSync settings.
Implemented in Raven::VulkanSwapchain.
Resizes 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. |
Implemented in Raven::VulkanSwapchain.
|
pure virtual |
Enables or disables vertical synchronization (VSync).
| enabled | True to enable VSync, false to disable. |
Implemented in Raven::VulkanSwapchain.
|
pure virtual |
Cleans up and releases all resources associated with the swapchain.
Implemented in Raven::VulkanSwapchain.