ULRE/inc/hgl/graph/module/SwapchainModule.h

35 lines
722 B
C
Raw Normal View History

#pragma once
#include<hgl/graph/module/RenderModule.h>
VK_NAMESPACE_BEGIN
class SwapchainModule:public GraphModule
{
2024-10-29 00:50:32 +08:00
Swapchain *swapchain=nullptr;
RTSwapchain *swapchain_rt=nullptr;
2024-11-09 00:58:13 +08:00
RenderPass *swapchain_rp=nullptr;
2024-11-09 00:10:27 +08:00
protected:
2024-11-09 00:58:13 +08:00
bool CreateSwapchainFBO();
2024-11-09 00:10:27 +08:00
bool CreateSwapchain();
public:
2024-11-09 00:10:27 +08:00
GRAPH_MODULE_CONSTRUCT(SwapchainModule)
2024-11-09 00:58:13 +08:00
virtual ~SwapchainModule();
2024-10-29 00:50:32 +08:00
bool Init() override;
2024-11-09 00:10:27 +08:00
2024-11-09 00:58:13 +08:00
RenderPass * GetRenderPass () {return swapchain_rp;}
2024-11-09 00:10:27 +08:00
RTSwapchain * GetRenderTarget () {return swapchain_rt;}
const VkExtent2D & GetSwapchainSize()const {return swapchain_rt->GetExtent();}
};//class SwapchainModule:public GraphModule
VK_NAMESPACE_END