From 414142283b7fe5b2929fa92c3b6d24f8a738961a Mon Sep 17 00:00:00 2001 From: hyzboy Date: Sun, 19 Jan 2025 19:41:57 +0800 Subject: [PATCH] moved OnResize to GraphModule from RenderModule --- inc/hgl/graph/module/GraphModule.h | 4 ++++ inc/hgl/graph/module/RenderModule.h | 4 +--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/inc/hgl/graph/module/GraphModule.h b/inc/hgl/graph/module/GraphModule.h index 5067cd17..9ce324b1 100644 --- a/inc/hgl/graph/module/GraphModule.h +++ b/inc/hgl/graph/module/GraphModule.h @@ -16,6 +16,10 @@ public: const GPUPhysicalDevice * GetPhysicalDevice ()const {return device->GetPhysicalDevice();} ///<取得物理设备 GPUDeviceAttribute *GetDeviceAttribute () {return device->GetDeviceAttribute();} ///<取得设备属性 +public: + + virtual void OnResize(const VkExtent2D &){}; ///<窗口大小改变 + public: GraphModule(GPUDevice *dev){device=dev;} diff --git a/inc/hgl/graph/module/RenderModule.h b/inc/hgl/graph/module/RenderModule.h index 682bc6ac..8b32e53a 100644 --- a/inc/hgl/graph/module/RenderModule.h +++ b/inc/hgl/graph/module/RenderModule.h @@ -17,9 +17,7 @@ public: using GraphModule::GraphModule; virtual ~RenderModule()=default; - virtual void OnResize(const VkExtent2D &)=0; ///<窗口大小改变 - - //virtual void OnFrameRender(const double,RenderCmdBuffer *)=0; ///<帧绘制回调 + virtual bool OnFrameRender(const double,RenderCmdBuffer *)=0; ///<帧绘制回调 };//class RenderModule #define RENDER_MODULE_CLASS(class_name) class class_name:public GraphModuleInherit