ULRE/inc/hgl/graph/RenderList.h

61 lines
1.5 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>
2019-05-25 01:06:33 +08:00
#include<hgl/type/Color4f.h>
2021-02-05 17:15:16 +08:00
#include<hgl/type/Sets.h>
2019-05-25 00:50:04 +08:00
namespace hgl
{
namespace graph
{
2021-04-30 18:56:20 +08:00
/**
* <br>
* mvp用UBO/SSBO等数据RenderCommandBuffer
*/
2019-05-25 00:50:04 +08:00
class RenderList
{
RenderCmdBuffer *cmd_buf;
2019-05-25 00:50:04 +08:00
private:
Camera *camera;
GPUBuffer *mvp_buffer;
List<RenderableInstance *> *ri_list;
2021-06-16 20:29:25 +08:00
VkDescriptorSet ds_list[(size_t)DescriptorSetsType::RANGE_SIZE];
DescriptorSets *renderable_desc_sets;
uint32_t ubo_offset;
uint32_t ubo_align;
private:
2019-05-25 00:50:04 +08:00
2020-10-21 12:47:06 +08:00
Pipeline * last_pipeline;
2021-06-16 20:29:25 +08:00
MaterialParameters *last_mp[(size_t)DescriptorSetsType::RANGE_SIZE];
uint32_t last_vbo;
2019-05-25 00:50:04 +08:00
2021-06-10 18:56:23 +08:00
void Render(RenderableInstance *);
2019-05-25 00:50:04 +08:00
2020-12-18 16:52:45 +08:00
private:
friend class SceneTreeToRenderList;
void Set(List<RenderableInstance *> *,GPUBuffer *,const uint32_t);
2019-05-25 00:50:04 +08:00
public:
2021-06-15 19:03:34 +08:00
RenderList();
virtual ~RenderList()=default;
2021-06-15 19:03:34 +08:00
bool Render(RenderCmdBuffer *);
};//class RenderList
2019-05-25 00:50:04 +08:00
}//namespace graph
}//namespace hgl
#endif//HGL_GRAPH_RENDER_LIST_INCLUDE