GraphModuleManager construct include RenderFramework;
This commit is contained in:
@@ -85,7 +85,9 @@ public: //module
|
||||
return tm;
|
||||
}
|
||||
|
||||
SwapchainModule *GetSwapchain(){return swapchain_module;} ///<取得Swapchain模块
|
||||
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)
|
||||
|
||||
|
Reference in New Issue
Block a user