diff --git a/inc/hgl/graph/RenderList2D.h b/inc/hgl/graph/RenderList2D.h index 7c7d5e8d..2e49a8a4 100644 --- a/inc/hgl/graph/RenderList2D.h +++ b/inc/hgl/graph/RenderList2D.h @@ -10,6 +10,18 @@ namespace hgl { namespace graph { + using RenderableList=List; + + struct RenderableList + { + Material *mtl; + + RenderableList ri_list; + + GPUArrayBuffer *.........array; + + }; + /** * 渲染对象列表
* 已经展开的渲染对象列表,产生mvp用UBO/SSBO等数据,最终创建RenderCommandBuffer @@ -32,7 +44,9 @@ namespace hgl private: - List ri_list; + RenderableList ri_list; + + *ri_list_by_mtl; 按材质区分的渲染列表 VkDescriptorSet ds_list[DESCRIPTOR_SET_TYPE_COUNT]; DescriptorSet *renderable_desc_sets; diff --git a/inc/hgl/graph/VKMaterialInstance.h b/inc/hgl/graph/VKMaterialInstance.h index a941c5cb..14c29a3b 100644 --- a/inc/hgl/graph/VKMaterialInstance.h +++ b/inc/hgl/graph/VKMaterialInstance.h @@ -34,4 +34,3 @@ public: };//class MaterialInstance VK_NAMESPACE_END #endif//HGL_GRAPH_VULKAN_MATERIAL_INSTANCE_INCLUDE - diff --git a/inc/hgl/graph/VKPipeline.h b/inc/hgl/graph/VKPipeline.h index e852b6c7..8efed3ea 100644 --- a/inc/hgl/graph/VKPipeline.h +++ b/inc/hgl/graph/VKPipeline.h @@ -35,6 +35,8 @@ public: operator VkPipeline(){return pipeline;} + const PipelineData *GetData()const{return data;} + const bool IsAlphaTest()const{return data->alpha_test>0;} const bool IsAlphaBlend()const{return data->alpha_blend;} };//class GraphicsPipeline