#ifndef HGL_GRAPH_RENDER_LIST_INCLUDE #define HGL_GRAPH_RENDER_LIST_INCLUDE #include #include #include #include #include #include #include #include namespace hgl { namespace graph { using MVPArrayBuffer=GPUArrayBuffer; using MaterialSets=SortedSets; /** * 渲染对象列表
* 已经展开的渲染对象列表,产生mvp用UBO/SSBO等数据,最终创建RenderCommandBuffer */ class RenderList { GPUDevice * device; RenderCmdBuffer *cmd_buf; private: CameraInfo camera_info; RenderNodeList render_node_list; ///<场景节点列表 MaterialSets material_sets; ///<材质合集 RenderNodeComparator render_node_comparator; private: MVPArrayBuffer *mvp_array; List 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: Pipeline * last_pipeline; MaterialParameters *last_mp[DESCRIPTOR_SET_TYPE_COUNT]; uint32_t last_vbo; void Render(Renderable *); public: RenderList(GPUDevice *); virtual ~RenderList(); virtual bool Expend(const CameraInfo &,SceneNode *); virtual bool Render(RenderCmdBuffer *); };//class RenderList }//namespace graph }//namespace hgl #endif//HGL_GRAPH_RENDER_LIST_INCLUDE