added to RenderCmdBuffer's Begin and End of Swapchain in RenderFramework::MainLoop

This commit is contained in:
2024-11-14 00:24:13 +08:00
parent 2ab78bf4e6
commit fda5b629a2
8 changed files with 72 additions and 4 deletions

View File

@@ -122,4 +122,14 @@ public: //回调事件
\
name(GraphModuleManager *gmm):GraphModule(gmm,GetModuleName()){}
#define RENDER_MODULE_CONSTRUCT(name) public:\
NO_COPY_NO_MOVE(name) \
static const AnsiIDName &GetModuleName() \
{ \
static const AnsiIDName id_name(#name); \
return id_name; \
} \
\
name(GraphModuleManager *gmm):RenderModule(gmm,GetModuleName()){}
VK_NAMESPACE_END

View File

@@ -24,6 +24,8 @@ public:
virtual ~RenderModule()=default;
virtual void OnResize(const VkExtent2D &ext)override{current_extent=ext;}
virtual void OnExecute(const double,RenderCmdBuffer *){}
};//class RenderModule
VK_NAMESPACE_END

View File

@@ -47,6 +47,8 @@ public:
const VkExtent2D & GetSwapchainSize()const {return swapchain_rt->GetExtent();}
RenderCmdBuffer *GetRenderCmdBuffer();
};//class SwapchainModule:public GraphModule
VK_NAMESPACE_END