Foray Library
rapid prototyping framework for crossplatform development of vulkan hardware ray tracing applications
|
Combines Window, Surface and Swapchain into one managing object. More...
#include <foray_vulkanwindowswapchain.hpp>
Public Types | |
using | BeforeWindowCreateFunctionPointer = std::function< void(osi::Window &)> |
Function called before window is created. | |
using | BeforeSwapchainBuildFunctionPointer = std::function< void(vkb::SwapchainBuilder &)> |
Function called before the swapchain is created. | |
using | OnResizedFunctionPointer = std::function< void(VkExtent2D)> |
Function called when a resize occurs. | |
using | MakeSwapchainImageNameFunctionPointer = std::function< std::string(uint32_t)> |
Function called for naming swapchain images. | |
Public Member Functions | |
VulkanWindowSwapchain ()=default | |
VulkanWindowSwapchain (core::Context *context, BeforeWindowCreateFunctionPointer beforeWindowCreateFunc, BeforeSwapchainBuildFunctionPointer beforeSwapchainBuildFunc, OnResizedFunctionPointer onResizedFunc, MakeSwapchainImageNameFunctionPointer makeSwapchainImageNameFunc) | |
void | CreateWindow () |
Create the Window. | |
void | CreateSwapchain () |
Create the Swapchain. | |
bool | Exists () const |
void | Destroy () |
void | HandleEvent (const osi::Event *event) |
Listens for WindowSizeChanged events to preemptively resize the swapchain. | |
void | RecreateSwapchain () |
Call to recreate the swapchain. | |
Protected Member Functions | |
void | ExtractSwapchainImages () |
void | DestroySwapchain () |
Protected Attributes | |
BeforeWindowCreateFunctionPointer | mBeforeWindowCreateFunc = nullptr |
BeforeSwapchainBuildFunctionPointer | mBeforeSwapchainBuildFunc = nullptr |
OnResizedFunctionPointer | mOnResizedFunc = nullptr |
MakeSwapchainImageNameFunctionPointer | mMakeSwapchainImageNameFunc = nullptr |
bool | mNameSwapchainImages = true |
core::Context * | mContext = nullptr |
osi::Window | mWindow |
VkSurfaceKHR | mSurface = nullptr |
vkb::Swapchain | mSwapchain |
std::vector< core::SwapchainImageInfo > | mSwapchainImages |
Combines Window, Surface and Swapchain into one managing object.
using foray::base::VulkanWindowSwapchain::BeforeSwapchainBuildFunctionPointer = std::function<void(vkb::SwapchainBuilder&)> |
Function called before the swapchain is created.
using foray::base::VulkanWindowSwapchain::BeforeWindowCreateFunctionPointer = std::function<void(osi::Window&)> |
Function called before window is created.
using foray::base::VulkanWindowSwapchain::MakeSwapchainImageNameFunctionPointer = std::function<std::string(uint32_t)> |
Function called for naming swapchain images.
using foray::base::VulkanWindowSwapchain::OnResizedFunctionPointer = std::function<void(VkExtent2D)> |
Function called when a resize occurs.
|
default |
|
inline |
void foray::base::VulkanWindowSwapchain::CreateSwapchain | ( | ) |
Create the Swapchain.
void foray::base::VulkanWindowSwapchain::CreateWindow | ( | ) |
Create the Window.
void foray::base::VulkanWindowSwapchain::Destroy | ( | ) |
|
protected |
|
inline |
|
protected |
void foray::base::VulkanWindowSwapchain::HandleEvent | ( | const osi::Event * | event | ) |
Listens for WindowSizeChanged events to preemptively resize the swapchain.
void foray::base::VulkanWindowSwapchain::RecreateSwapchain | ( | ) |
Call to recreate the swapchain.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |