ULRE/inc/hgl/graph/RenderList2D.h

44 lines
1.3 KiB
C
Raw Normal View History

2023-03-24 22:14:43 +08:00
#ifndef HGL_GRAPH_RENDER_LIST_2D_INCLUDE
#define HGL_GRAPH_RENDER_LIST_2D_INCLUDE
2023-03-23 21:43:10 +08:00
#include<hgl/graph/VK.h>
#include<hgl/graph/SceneNode.h>
2023-03-24 22:14:43 +08:00
#include<hgl/graph/RenderNode2D.h>
2023-03-23 21:43:10 +08:00
#include<hgl/graph/VKArrayBuffer.h>
2023-03-24 22:14:43 +08:00
#include<hgl/graph/VKMaterial.h>
2023-03-23 21:43:10 +08:00
namespace hgl
{
namespace graph
{
/**
* <br>
* 使使Clear()
2023-03-23 21:43:10 +08:00
*/
2023-03-24 22:14:43 +08:00
class RenderList2D
2023-03-23 21:43:10 +08:00
{
protected:
2023-03-24 22:14:43 +08:00
GPUDevice * device;
2023-03-23 21:43:10 +08:00
uint renderable_count; ///<可渲染对象数量
MaterialRenderMap2D mrl_map; ///<按材质分类的渲染列表
2023-03-23 21:43:10 +08:00
protected:
virtual bool ExpendNode(SceneNode *);
2023-03-23 21:43:10 +08:00
public:
2023-03-24 22:14:43 +08:00
RenderList2D(GPUDevice *);
virtual ~RenderList2D();
2023-03-23 21:43:10 +08:00
virtual bool Expend(SceneNode *); ///<展开场景树到渲染列表
virtual bool Render(RenderCmdBuffer *); ///<渲染所有对象
2023-03-23 21:43:10 +08:00
virtual void Clear(); ///<彻底清理
2023-03-24 22:14:43 +08:00
};//class RenderList2D
2023-03-23 21:43:10 +08:00
}//namespace graph
}//namespace hgl
2023-03-24 22:14:43 +08:00
#endif//HGL_GRAPH_RENDER_LIST_2D_INCLUDE