英文语法修改Registry->Register
This commit is contained in:
Submodule CMAssetsManage updated: 0244bff1b6...60f448a850
2
CMCore
2
CMCore
Submodule CMCore updated: f6c50e29d9...25060b07d0
Submodule CMPlatform updated: fd0929d89c...b6cf73deca
2
CMUtil
2
CMUtil
Submodule CMUtil updated: 48383e5f63...d67a309f94
@@ -88,7 +88,7 @@ public:
|
||||
{
|
||||
CloseShaderCompiler();
|
||||
|
||||
win->UnregistryEventDispatch(this);
|
||||
win->UnregisterEventDispatch(this);
|
||||
|
||||
SAFE_CLEAR(db);
|
||||
SAFE_CLEAR_OBJECT_ARRAY_OBJECT(cmd_buf,swap_chain_count);
|
||||
@@ -154,7 +154,7 @@ public:
|
||||
|
||||
InitCommandBuffer();
|
||||
|
||||
win->RegistryEventDispatch(this);
|
||||
win->RegisterEventDispatch(this);
|
||||
|
||||
{
|
||||
vp_info.Set(w,h);
|
||||
@@ -403,8 +403,8 @@ public:
|
||||
ckc=new CameraKeyboardControl(camera_control);
|
||||
cmc=new CameraMouseControl(camera_control);
|
||||
|
||||
win->RegistryEventDispatch(ckc);
|
||||
win->RegistryEventDispatch(cmc);
|
||||
win->RegisterEventDispatch(ckc);
|
||||
win->RegisterEventDispatch(cmc);
|
||||
|
||||
RefreshCameraInfo(camera_control->GetCameraInfo(),&vp_info,camera);
|
||||
|
||||
|
@@ -29,12 +29,12 @@ namespace hgl
|
||||
{
|
||||
render_framework=rf;
|
||||
|
||||
rf->RegistryEventDispatch(this);
|
||||
rf->RegisterEventDispatch(this);
|
||||
}
|
||||
|
||||
virtual ~WorkManager()
|
||||
{
|
||||
render_framework->UnregistryEventDispatch(this);
|
||||
render_framework->UnregisterEventDispatch(this);
|
||||
SAFE_CLEAR(cur_work_object);
|
||||
}
|
||||
|
||||
|
@@ -190,7 +190,7 @@ public: //事件
|
||||
const size_t GetDataTypeHash ()const override{return StaticDataTypeHash();} \
|
||||
const size_t GetTypeHash ()const override{return StaticTypeHash();}
|
||||
|
||||
bool RegistryComponentManager(ComponentManager *);
|
||||
bool RegisterComponentManager(ComponentManager *);
|
||||
ComponentManager *GetComponentManager(const size_t hash_code);
|
||||
|
||||
template<typename T> inline T *GetComponentManager(bool create_default=true)
|
||||
@@ -201,7 +201,7 @@ template<typename T> inline T *GetComponentManager(bool create_default=true)
|
||||
{
|
||||
cm=new T;
|
||||
|
||||
RegistryComponentManager(cm);
|
||||
RegisterComponentManager(cm);
|
||||
}
|
||||
|
||||
return cm;
|
||||
|
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include<hgl/graph/SceneNode.h>
|
||||
#include<hgl/type/Pool.h>
|
||||
@@ -36,14 +36,14 @@ namespace hgl::graph
|
||||
}
|
||||
};//class Scene
|
||||
|
||||
bool RegistryScene(Scene *sw); ///<注册场景
|
||||
bool UnregistryScene(const U8String &scene_name); ///<注销场景
|
||||
bool RegisterScene(Scene *sw); ///<注册场景
|
||||
bool UnregisterScene(const U8String &scene_name); ///<注销场景
|
||||
|
||||
inline bool UnregistryScene(Scene *sw) ///<注销场景
|
||||
inline bool UnregisterScene(Scene *sw) ///<注销场景
|
||||
{
|
||||
if(!sw)return(false);
|
||||
|
||||
return UnregistryScene(sw->GetSceneName());
|
||||
return UnregisterScene(sw->GetSceneName());
|
||||
}
|
||||
|
||||
Scene *GetScene(const U8String &scene_name); ///<获取指定名称的场景
|
||||
|
@@ -36,8 +36,8 @@ public:
|
||||
template<typename T>
|
||||
bool Contains()const{return Contains(typeid(T).hash_code());} ///<确认是否包含指定类型的模块
|
||||
|
||||
bool Registry(GraphModule *); ///<注册一个模块
|
||||
bool Unregistry(GraphModule *); ///<注销一个模块
|
||||
bool Register(GraphModule *); ///<注册一个模块
|
||||
bool Unregister(GraphModule *); ///<注销一个模块
|
||||
|
||||
template<typename T>
|
||||
T *GetOrCreate() ///<注册一个模块
|
||||
@@ -47,7 +47,7 @@ public:
|
||||
|
||||
T *result=new T(render_framework);
|
||||
|
||||
Registry(result);
|
||||
Register(result);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include<hgl/graph/VK.h>
|
||||
#include<hgl/graph/mtl/StdMaterial.h>
|
||||
@@ -31,18 +31,18 @@ public:
|
||||
|
||||
};//class MaterialFactory
|
||||
|
||||
bool RegistryMaterialFactory(MaterialFactory *);
|
||||
bool RegisterMaterialFactory(MaterialFactory *);
|
||||
MaterialFactory * GetMaterialFactory(const MaterialName &);
|
||||
|
||||
template<typename T> class RegistryMaterialFactoryClass
|
||||
template<typename T> class RegisterMaterialFactoryClass
|
||||
{
|
||||
public:
|
||||
|
||||
RegistryMaterialFactoryClass()
|
||||
RegisterMaterialFactoryClass()
|
||||
{
|
||||
STD_MTL_NAMESPACE::RegistryMaterialFactory(new T);
|
||||
STD_MTL_NAMESPACE::RegisterMaterialFactory(new T);
|
||||
}
|
||||
};//class RegistryMaterialFactoryClass
|
||||
};//class RegisterMaterialFactoryClass
|
||||
|
||||
#define DEFINE_MATERIAL_FACTORY_CLASS(name,cfg_type) \
|
||||
namespace inline_material \
|
||||
@@ -70,7 +70,7 @@ namespace \
|
||||
} \
|
||||
}; \
|
||||
\
|
||||
static RegistryMaterialFactoryClass<MaterialFactory##name> MaterialFactoryInstance_##name; \
|
||||
static RegisterMaterialFactoryClass<MaterialFactory##name> MaterialFactoryInstance_##name; \
|
||||
}
|
||||
|
||||
MaterialCreateInfo *CreateMaterialCreateInfo(const VulkanDevAttr *dev_attr,const MaterialName &,MaterialCreateConfig *cfg);
|
||||
|
2
res
2
res
Submodule res updated: e1a36d78f0...fe8fcabeb5
@@ -111,7 +111,7 @@ bool RenderFramework::Init(uint w,uint h)
|
||||
if(!device)
|
||||
return(false);
|
||||
|
||||
win->RegistryEventDispatch(this);
|
||||
win->RegisterEventDispatch(this);
|
||||
|
||||
module_manager=new GraphModuleManager(this);
|
||||
|
||||
@@ -126,10 +126,10 @@ bool RenderFramework::Init(uint w,uint h)
|
||||
return(false);
|
||||
|
||||
rt_manager=new RenderTargetManager(this,tex_manager,rp_manager);
|
||||
module_manager->Registry(rt_manager);
|
||||
module_manager->Register(rt_manager);
|
||||
|
||||
sc_module=new SwapchainModule(this,tex_manager,rt_manager,rp_manager);
|
||||
module_manager->Registry(sc_module);
|
||||
module_manager->Register(sc_module);
|
||||
|
||||
render_resource=new RenderResource(device);
|
||||
|
||||
@@ -160,8 +160,8 @@ void RenderFramework::CreateDefaultRenderer()
|
||||
auto ckc=new CameraKeyboardControl(fpcc);
|
||||
auto cmc=new CameraMouseControl(fpcc);
|
||||
|
||||
this->RegistryEventDispatch(ckc);
|
||||
this->RegistryEventDispatch(cmc);
|
||||
this->RegisterEventDispatch(ckc);
|
||||
this->RegisterEventDispatch(cmc);
|
||||
|
||||
default_camera_control=fpcc;
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
#include<hgl/component/Component.h>
|
||||
#include<hgl/component/Component.h>
|
||||
#include<tsl/robin_map.h>
|
||||
#include<hgl/type/String.h>
|
||||
#include<hgl/log/LogInfo.h>
|
||||
@@ -32,7 +32,7 @@ namespace hgl::graph
|
||||
component_manager_map=nullptr;
|
||||
}
|
||||
|
||||
bool RegistryComponentManager(ComponentManager *cm)
|
||||
bool RegisterComponentManager(ComponentManager *cm)
|
||||
{
|
||||
if(!cm)return(false);
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
#include<hgl/graph/module/GraphModule.h>
|
||||
#include<hgl/graph/module/GraphModule.h>
|
||||
#include<hgl/graph/module/GraphModuleManager.h>
|
||||
#include<hgl/graph/RenderFramework.h>
|
||||
|
||||
@@ -9,7 +9,7 @@ VulkanDevice *GraphModuleManager::GetDevice()const
|
||||
return render_framework->GetDevice();
|
||||
}
|
||||
|
||||
bool GraphModuleManager::Registry(GraphModule *gm)
|
||||
bool GraphModuleManager::Register(GraphModule *gm)
|
||||
{
|
||||
if(!gm)
|
||||
return(false);
|
||||
@@ -25,7 +25,7 @@ bool GraphModuleManager::Registry(GraphModule *gm)
|
||||
return(true);
|
||||
}
|
||||
|
||||
bool GraphModuleManager::Unregistry(GraphModule *gm)
|
||||
bool GraphModuleManager::Unregister(GraphModule *gm)
|
||||
{
|
||||
if(!gm)
|
||||
return(false);
|
||||
|
@@ -1,4 +1,4 @@
|
||||
#include<hgl/graph/Scene.h>
|
||||
#include<hgl/graph/Scene.h>
|
||||
#include<hgl/type/Map.h>
|
||||
|
||||
namespace hgl::graph
|
||||
@@ -8,7 +8,7 @@ namespace hgl::graph
|
||||
Map<U8String,Scene *> scene_world_map;///<场景列表
|
||||
}//namespace
|
||||
|
||||
bool RegistryScene(Scene *sw)
|
||||
bool RegisterScene(Scene *sw)
|
||||
{
|
||||
if(!sw)return(false);
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace hgl::graph
|
||||
return GetObjectFromMap(scene_world_map,scene_name);
|
||||
}
|
||||
|
||||
bool UnregistryScene(const U8String &scene_name)
|
||||
bool UnregisterScene(const U8String &scene_name)
|
||||
{
|
||||
if(scene_name.IsEmpty())
|
||||
return(false);
|
||||
|
@@ -1,4 +1,4 @@
|
||||
#include<hgl/graph/mtl/MaterialLibrary.h>
|
||||
#include<hgl/graph/mtl/MaterialLibrary.h>
|
||||
#include<hgl/type/IDName.h>
|
||||
#include<hgl/type/Map.h>
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace
|
||||
MaterialFactoryMapPtr material_factory_map=nullptr;
|
||||
}//namespace
|
||||
|
||||
bool RegistryMaterialFactory(MaterialFactory *mf)
|
||||
bool RegisterMaterialFactory(MaterialFactory *mf)
|
||||
{
|
||||
if(!mf)
|
||||
return(false);
|
||||
|
Reference in New Issue
Block a user