ULRE/inc/hgl/graph/RenderList.h

72 lines
1.7 KiB
C
Raw Normal View History

2019-05-25 00:50:04 +08:00
#ifndef HGL_GRAPH_RENDER_LIST_INCLUDE
#define HGL_GRAPH_RENDER_LIST_INCLUDE
#include<hgl/graph/VK.h>
2019-05-25 00:50:04 +08:00
#include<hgl/graph/Camera.h>
#include<hgl/graph/SceneNode.h>
2021-06-10 18:56:23 +08:00
#include<hgl/graph/RenderNode.h>
#include<hgl/graph/VKArrayBuffer.h>
2021-05-24 20:44:20 +08:00
#include<hgl/graph/SceneInfo.h>
#include<hgl/color/Color4f.h>
2023-03-25 15:47:08 +08:00
#include<hgl/graph/VKMaterial.h>
2019-05-25 00:50:04 +08:00
namespace hgl
{
namespace graph
{
2023-04-25 18:08:26 +08:00
2021-04-30 18:56:20 +08:00
/**
* <br>
2023-04-25 18:08:26 +08:00
* RenderCommandBuffer
2021-04-30 18:56:20 +08:00
*/
2019-05-25 00:50:04 +08:00
class RenderList
{
2023-03-24 22:14:43 +08:00
protected:
2023-03-22 21:19:23 +08:00
2023-03-24 22:14:43 +08:00
GPUDevice * device;
RenderCmdBuffer * cmd_buf;
2019-05-25 00:50:04 +08:00
private:
2023-03-24 22:14:43 +08:00
CameraInfo camera_info;
2023-04-25 18:08:26 +08:00
MaterialRenderMap mrl_map;
2023-04-25 18:08:26 +08:00
RenderNodeComparator *render_node_comparator;
private:
List<Renderable *> ri_list;
VkDescriptorSet ds_list[DESCRIPTOR_SET_TYPE_COUNT];
DescriptorSet *renderable_desc_sets;
uint32_t ubo_offset;
uint32_t ubo_align;
protected:
virtual bool Begin();
virtual bool Expend(SceneNode *);
virtual void End();
private:
2019-05-25 00:50:04 +08:00
2020-10-21 12:47:06 +08:00
Pipeline * last_pipeline;
MaterialParameters *last_mp[DESCRIPTOR_SET_TYPE_COUNT];
uint32_t last_vbo;
2019-05-25 00:50:04 +08:00
void Render(Renderable *);
2019-05-25 00:50:04 +08:00
public:
RenderList(GPUDevice *);
virtual ~RenderList();
2023-03-24 22:14:43 +08:00
virtual bool Expend(const CameraInfo &,SceneNode *);
virtual bool Render(RenderCmdBuffer *);
};//class RenderList
2019-05-25 00:50:04 +08:00
}//namespace graph
}//namespace hgl
#endif//HGL_GRAPH_RENDER_LIST_INCLUDE