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

35 lines
669 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:10:27 +08:00
protected:
bool CreateSwapchain();
bool CreateSwapchainRenderTarget();
bool CreateSwapchainFBO(Swapchain *);
public:
2024-11-09 00:10:27 +08:00
GRAPH_MODULE_CONSTRUCT(SwapchainModule)
virtual ~SwapchainModule()=default;
2024-10-29 00:50:32 +08:00
bool Init() override;
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