Merge branch 'devel_37_RenderFramework' of http://www.hyzgame.com:3000/hyzboy/ULRE into devel_37_RenderFramework
# Conflicts: # inc/hgl/graph/module/SwapchainModule.h # src/SceneGraph/module/GraphModule.cpp
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
#include<hgl/graph/VK.h>
|
||||
#include<hgl/graph/VKDevice.h>
|
||||
#include<hgl/type/IDName.h>
|
||||
#include<hgl/type/StrChar.h>
|
||||
|
||||
VK_NAMESPACE_BEGIN
|
||||
|
||||
@@ -152,18 +153,21 @@ public:
|
||||
|
||||
virtual bool Init()=0; ///<初始化当前模块
|
||||
|
||||
static const AnsiIDNameSet &GetDependentModules() ///<取得依赖的模块列表
|
||||
{
|
||||
static const AnsiIDNameSet empty;
|
||||
|
||||
return empty;
|
||||
}
|
||||
static const char **GetDependentModules(){return nullptr;} ///<取得依赖的模块列表
|
||||
|
||||
const int compare(const GraphModule &gm)const override
|
||||
{
|
||||
auto &dependent_modules_name=GetDependentModules();
|
||||
const char **dependent_modules_list=GetDependentModules();
|
||||
|
||||
return(dependent_modules_name.Contains(gm.module_name)?1:-1); //如果我依赖于他,那么我比他大
|
||||
if(!dependent_modules_list)
|
||||
return -1;
|
||||
|
||||
const char *self_module_name=gm.GetName().ToString();
|
||||
|
||||
if(string_in_list(dependent_modules_list,self_module_name))
|
||||
return 1;//如果我依赖于他,那么我比他大
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public: //回调事件
|
||||
|
2
res
2
res
Submodule res updated: e1a36d78f0...475d8ad43c
@@ -52,10 +52,9 @@ RenderTarget *RenderTargetManager::CreateRT(const FramebufferInfo *fbi,RenderPas
|
||||
RenderTarget *RenderTargetManager::CreateRT(const FramebufferInfo *fbi,const uint32_t fence_count)
|
||||
{
|
||||
if(!fbi)return(nullptr);
|
||||
if(!rp_manager)return(nullptr); //这个判断理论上不可能成立
|
||||
|
||||
RenderPassManager *rpm=GetModule<RenderPassManager>();
|
||||
|
||||
RenderPass *rp=rpm->AcquireRenderPass(fbi);
|
||||
RenderPass *rp=rp_manager->AcquireRenderPass(fbi);
|
||||
|
||||
if(!rp)return(nullptr);
|
||||
|
||||
|
@@ -13,7 +13,8 @@ namespace
|
||||
{
|
||||
const char *tex_manager_dep[]
|
||||
{
|
||||
"RenderPassManager"
|
||||
"RenderPassManager",
|
||||
nullptr //一定要0结尾
|
||||
};
|
||||
}
|
||||
|
||||
@@ -22,10 +23,8 @@ const char **TextureManager::GetDependentModules()
|
||||
return tex_manager_dep;
|
||||
}
|
||||
|
||||
bool TextureManager::Init(GraphModulesMap *gmm)
|
||||
bool TextureManager::Init()
|
||||
{
|
||||
|
||||
|
||||
GPUDevice *dev=GetDevice();
|
||||
|
||||
if(!dev)
|
||||
|
Reference in New Issue
Block a user