建立Component,第一步先将Renderable渲染迁移到这上面来
This commit is contained in:
parent
d43a877be1
commit
ada6a41fc6
21
inc/hgl/component/Component.h
Normal file
21
inc/hgl/component/Component.h
Normal 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
|
0
inc/hgl/component/PrimitiveComponent.h
Normal file
0
inc/hgl/component/PrimitiveComponent.h
Normal file
19
inc/hgl/component/RenderComponent.h
Normal file
19
inc/hgl/component/RenderComponent.h
Normal 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
|
@ -5,13 +5,22 @@ namespace hgl
|
|||||||
{
|
{
|
||||||
namespace graph
|
namespace graph
|
||||||
{
|
{
|
||||||
|
class CameraData
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
class CameraManager
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 场景管理器<Br>
|
* 世界场景管理器<Br>
|
||||||
* 管理一个场景中的所有资源与场景节点
|
* 管理一个世界场景中的所有资源与场景节点
|
||||||
*/
|
*/
|
||||||
class SceneWorld
|
class SceneWorld
|
||||||
{
|
{
|
||||||
SceneNode *root_node;
|
SceneNode *root_node; ///<世界根节点
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
@ -296,6 +296,14 @@ SET(VK_RENDERABLE_SOURCE ${SG_INCLUDE_PATH}/VKRenderable.h
|
|||||||
|
|
||||||
SOURCE_GROUP("Vulkan\\Renderable" FILES ${VK_RENDERABLE_SOURCE})
|
SOURCE_GROUP("Vulkan\\Renderable" FILES ${VK_RENDERABLE_SOURCE})
|
||||||
|
|
||||||
|
set(COMPONENT_INCLUDE_PATH ${ROOT_INCLUDE_PATH}/hgl/component)
|
||||||
|
|
||||||
|
SET(COMPONENT_FILES ${COMPONENT_INCLUDE_PATH}/Component.h
|
||||||
|
${COMPONENT_INCLUDE_PATH}/RenderComponent.h
|
||||||
|
${COMPONENT_INCLUDE_PATH}/PrimitiveComponent.h)
|
||||||
|
|
||||||
|
SOURCE_GROUP("Component" FILES ${COMPONENT_FILES})
|
||||||
|
|
||||||
IF(WIN32)
|
IF(WIN32)
|
||||||
OPTION(FORCE_DISCETE_GPU "Force Discrete GPU" OFF)
|
OPTION(FORCE_DISCETE_GPU "Force Discrete GPU" OFF)
|
||||||
|
|
||||||
@ -374,6 +382,8 @@ add_cm_library(ULRE.SceneGraph "ULRE" ${SCENE_GRAPH_FILES}
|
|||||||
${STATIC_MESH_HEADER_FILES}
|
${STATIC_MESH_HEADER_FILES}
|
||||||
${STATIC_MESH_SOURCE_FILES}
|
${STATIC_MESH_SOURCE_FILES}
|
||||||
|
|
||||||
|
${COMPONENT_FILES}
|
||||||
|
|
||||||
# ${FONT_MANAGE_SOURCE}
|
# ${FONT_MANAGE_SOURCE}
|
||||||
# ${FONT_SOURCE}
|
# ${FONT_SOURCE}
|
||||||
# ${FONT_SOURCE_OS}
|
# ${FONT_SOURCE_OS}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user