2025-01-25 01:41:00 +08:00
|
|
|
|
#pragma once
|
2019-07-13 02:37:19 +08:00
|
|
|
|
|
2020-10-21 11:43:18 +08:00
|
|
|
|
#include<hgl/graph/VK.h>
|
2019-07-13 02:37:19 +08:00
|
|
|
|
VK_NAMESPACE_BEGIN
|
2025-01-25 01:41:00 +08:00
|
|
|
|
|
|
|
|
|
struct SwapchainImage
|
|
|
|
|
{
|
|
|
|
|
Texture2D * color =nullptr;
|
|
|
|
|
Texture2D * depth =nullptr;
|
|
|
|
|
|
|
|
|
|
Framebuffer * fbo =nullptr;
|
|
|
|
|
|
2025-01-25 15:25:29 +08:00
|
|
|
|
RenderCmdBuffer * cmd_buf =nullptr;
|
2025-01-25 01:41:00 +08:00
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
2025-01-25 21:16:25 +08:00
|
|
|
|
~SwapchainImage();
|
2025-01-25 01:41:00 +08:00
|
|
|
|
};//struct SwapchainImage
|
|
|
|
|
|
2019-07-16 20:57:17 +08:00
|
|
|
|
struct Swapchain
|
2019-07-15 22:37:00 +08:00
|
|
|
|
{
|
2019-07-16 20:57:17 +08:00
|
|
|
|
public:
|
2019-07-13 02:37:19 +08:00
|
|
|
|
|
2025-01-19 18:13:06 +08:00
|
|
|
|
VkDevice device =VK_NULL_HANDLE;
|
2019-07-16 20:57:17 +08:00
|
|
|
|
|
2025-01-19 18:13:06 +08:00
|
|
|
|
VkExtent2D extent;
|
|
|
|
|
VkSurfaceTransformFlagBitsKHR transform;
|
2019-07-13 02:37:19 +08:00
|
|
|
|
|
2025-01-19 18:13:06 +08:00
|
|
|
|
VkSwapchainKHR swap_chain =VK_NULL_HANDLE;
|
2025-01-25 01:41:00 +08:00
|
|
|
|
VkSurfaceFormatKHR surface_format {};
|
|
|
|
|
VkFormat depth_format =VK_FORMAT_UNDEFINED;
|
2019-07-13 02:37:19 +08:00
|
|
|
|
|
2025-01-25 01:41:00 +08:00
|
|
|
|
uint32_t image_count =0;
|
2019-07-13 02:37:19 +08:00
|
|
|
|
|
2025-01-25 01:41:00 +08:00
|
|
|
|
SwapchainImage * sc_image =nullptr;
|
2019-07-13 02:37:19 +08:00
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
2019-07-15 22:37:00 +08:00
|
|
|
|
virtual ~Swapchain();
|
2019-07-16 20:57:17 +08:00
|
|
|
|
};//struct Swapchain
|
2019-07-13 02:37:19 +08:00
|
|
|
|
VK_NAMESPACE_END
|