GraphModuleManager construct include RenderFramework;
This commit is contained in:
parent
4f335f7230
commit
ff475a69b1
2
CMCore
2
CMCore
@ -1 +1 @@
|
||||
Subproject commit 753b78dddf234cd305b5d211c687b311eebaaf8a
|
||||
Subproject commit 680b7717fc9253b138108b5f59b985f6bbc5b4e3
|
@ -1 +1 @@
|
||||
Subproject commit c958a6cb2ac4a52716eabc1c45eba184f4c7e46c
|
||||
Subproject commit 7bb7dbc31d3cb0d8556ce78d10243e852211326f
|
2
CMUtil
2
CMUtil
@ -1 +1 @@
|
||||
Subproject commit f7dce0304822280d0db23ae607783b7c3cd183fa
|
||||
Subproject commit 289cf37a6f893aa706988118b2d15edfb4f97dec
|
@ -85,6 +85,8 @@ public: //module
|
||||
return tm;
|
||||
}
|
||||
|
||||
GPUDevice * GetDevice (){return device;}
|
||||
VkDevice GetVkDevice (){return device->GetDevice();}
|
||||
SwapchainModule * GetSwapchain(){return swapchain_module;} ///<取得Swapchain模块
|
||||
|
||||
public: //manager
|
||||
|
@ -6,6 +6,13 @@ VK_NAMESPACE_BEGIN
|
||||
|
||||
class MaterialManager:public GraphModule
|
||||
{
|
||||
};//
|
||||
|
||||
|
||||
public:
|
||||
|
||||
GRAPH_MODULE_CONSTRUCT(MaterialManager)
|
||||
virtual ~MaterialManager();
|
||||
|
||||
};//class MaterialManager:public GraphModule
|
||||
|
||||
VK_NAMESPACE_END
|
@ -9,9 +9,12 @@ VK_NAMESPACE_BEGIN
|
||||
class RenderCmdBuffer;
|
||||
class GraphModule;
|
||||
|
||||
class RenderFramework;
|
||||
|
||||
class GraphModuleManager
|
||||
{
|
||||
GPUDevice *device;
|
||||
RenderFramework *framework;
|
||||
|
||||
List<GraphModule *> module_list; ///<模块列表
|
||||
|
||||
@ -19,7 +22,7 @@ class GraphModuleManager
|
||||
|
||||
public:
|
||||
|
||||
GraphModuleManager(GPUDevice *dev){device=dev;}
|
||||
GraphModuleManager(RenderFramework *);
|
||||
~GraphModuleManager();
|
||||
|
||||
GPUDevice * GetDevice ()noexcept {return device;} ///<取得GPU设备
|
||||
@ -27,6 +30,8 @@ public:
|
||||
const GPUPhysicalDevice * GetPhysicalDevice ()const {return device->GetPhysicalDevice();} ///<取得物理设备
|
||||
GPUDeviceAttribute *GetDeviceAttribute () {return device->GetDeviceAttribute();} ///<取得设备属性
|
||||
|
||||
RenderFramework * GetFramework () {return framework;} ///<取得渲染框架
|
||||
|
||||
/**
|
||||
* 获取指定名称的模块
|
||||
* @param create 如果不存在,是否创建新的
|
||||
@ -79,6 +84,8 @@ public:
|
||||
const GPUPhysicalDevice * GetPhysicalDevice ()const {return module_manager->GetPhysicalDevice();} ///<取得物理设备
|
||||
GPUDeviceAttribute *GetDeviceAttribute () {return module_manager->GetDeviceAttribute();} ///<取得设备属性
|
||||
|
||||
RenderFramework * GetFramework () {return module_manager->GetFramework();} ///<取得渲染框架
|
||||
|
||||
static const AnsiIDName * GetModuleName (){return nullptr;} ///<取得模块名称(标准通用的名称,比如Upscale,供通用模块使用)
|
||||
virtual const AnsiIDName * GetName ()const{return &module_name;} ///<取得名称(完整的私有名称,比如FSR3Upscale,DLSS3Upscale)
|
||||
|
||||
|
@ -148,7 +148,7 @@ bool RenderFramework::Init(uint w,uint h,const OSString &app_name)
|
||||
if(!device)
|
||||
return(false);
|
||||
|
||||
graph_module_manager=InitGraphModuleManager(device);
|
||||
graph_module_manager=InitGraphModuleManager(device,this);
|
||||
|
||||
render_pass_manager =graph_module_manager->GetModule<RenderPassManager>(true);
|
||||
texture_manager =graph_module_manager->GetModule<TextureManager>(true);
|
||||
|
@ -105,6 +105,11 @@ GraphModule *GraphModuleManager::GetModule(const AnsiIDName &name,bool create)
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
GraphModuleManager::GraphModuleManager(RenderFramework *rf)
|
||||
{
|
||||
framework=rf;
|
||||
}
|
||||
|
||||
GraphModuleManager::~GraphModuleManager()
|
||||
{
|
||||
//按顺序加入module_list的,要倒着释放
|
||||
|
Loading…
x
Reference in New Issue
Block a user