建立Component,第一步先将Renderable渲染迁移到这上面来

This commit is contained in:
2025-03-18 01:26:35 +08:00
parent d43a877be1
commit ada6a41fc6
6 changed files with 65 additions and 6 deletions

View File

@@ -0,0 +1,21 @@
#pragma once
#include<hgl/type/DataType.h>
namespace hgl::graph
{
/**
* 基础组件<br>
* 是一切组件的基类
*/
class BaseComponent
{
public:
virtual ~BaseComponent()=default;
public: //序列化
};//class BaseComponent
}//namespace hgl::graph

View File

View File

@@ -0,0 +1,19 @@
#pragma once
#include<hgl/component/Component.h>
namespace hgl::graph
{
/**
* 可渲染组件
*/
class RenderComponent: public BaseComponent
{
public:
RenderComponent()=default;
virtual ~RenderComponent()=default;
virtual void Render()=0;
};//class RenderComponent
}//namespace hgl::graph