diff --git a/CMCore b/CMCore index 116799bc..3b71e680 160000 --- a/CMCore +++ b/CMCore @@ -1 +1 @@ -Subproject commit 116799bc4ea02ffe85e8cb071272b1cddc2753c1 +Subproject commit 3b71e680cc71689bed3dbed0491324819f5e2edc diff --git a/CMPlatform b/CMPlatform index 618fda25..2ad618e1 160000 --- a/CMPlatform +++ b/CMPlatform @@ -1 +1 @@ -Subproject commit 618fda25036a1949de990d0588e87f838f15e6c8 +Subproject commit 2ad618e1ffd27bfe8df2b966e1cb8049fa9d114b diff --git a/CMSceneGraph b/CMSceneGraph index 1c67c9e3..286f5f43 160000 --- a/CMSceneGraph +++ b/CMSceneGraph @@ -1 +1 @@ -Subproject commit 1c67c9e3ac8d7ccf6c05e9b67ad525a8d94fc496 +Subproject commit 286f5f438733ac608b8a0892d5869620c06d7f86 diff --git a/CMUtil b/CMUtil index 3afa4e27..ff819d8a 160000 --- a/CMUtil +++ b/CMUtil @@ -1 +1 @@ -Subproject commit 3afa4e27e9cf444c4d6c875d41ab4a25d7454980 +Subproject commit ff819d8a60753269343a3f87777ee03ae5071cb4 diff --git a/inc/hgl/graph/MaterialRenderList.h b/inc/hgl/graph/MaterialRenderList.h index 6da221f3..3a9ca3cd 100644 --- a/inc/hgl/graph/MaterialRenderList.h +++ b/inc/hgl/graph/MaterialRenderList.h @@ -63,9 +63,9 @@ public: void Add(Renderable *ri,const Matrix4f &mat); - void ClearData() + void Clear() { - rn_list.ClearData(); + rn_list.Clear(); } void End(); diff --git a/inc/hgl/graph/MaterialRenderMap.h b/inc/hgl/graph/MaterialRenderMap.h index c274cc03..5687720f 100644 --- a/inc/hgl/graph/MaterialRenderMap.h +++ b/inc/hgl/graph/MaterialRenderMap.h @@ -12,7 +12,7 @@ public: void Begin() { for(auto *it:data_list) - it->value->ClearData(); + it->value->Clear(); } void End() diff --git a/inc/hgl/graph/SceneNode.h b/inc/hgl/graph/SceneNode.h index 1cc4f395..030a7eba 100644 --- a/inc/hgl/graph/SceneNode.h +++ b/inc/hgl/graph/SceneNode.h @@ -43,7 +43,7 @@ namespace hgl void Clear() { - SubNode.ClearData(); + SubNode.Clear(); render_obj=nullptr; } diff --git a/inc/hgl/graph/font/TileFont.h b/inc/hgl/graph/font/TileFont.h index 1de8e72d..74e31ab5 100644 --- a/inc/hgl/graph/font/TileFont.h +++ b/inc/hgl/graph/font/TileFont.h @@ -3,7 +3,7 @@ #include #include -#include +#include namespace hgl { @@ -11,7 +11,7 @@ namespace hgl { using TileUVFloatMap=Map; - using TileResPool=ResPool; + using TileResPool=RefObjectPool; /** * Tile字符管理
diff --git a/inc/hgl/graph/mtl/2d/Material2DCreateConfig.h b/inc/hgl/graph/mtl/2d/Material2DCreateConfig.h index c6d017a6..5d8c7aaa 100644 --- a/inc/hgl/graph/mtl/2d/Material2DCreateConfig.h +++ b/inc/hgl/graph/mtl/2d/Material2DCreateConfig.h @@ -11,6 +11,8 @@ struct Material2DCreateConfig:public MaterialCreateConfig bool local_to_world; ///<包含LocalToWorld矩阵 + bool use_8bit_color; ///<使用rgba8格式颜色(默认使用rgba32f) + public: Material2DCreateConfig(const GPUDeviceAttribute *da,const AnsiString &name):MaterialCreateConfig(da,name) diff --git a/src/SceneGraph/MaterialRenderList.cpp b/src/SceneGraph/MaterialRenderList.cpp index 10607353..bf8589fb 100644 --- a/src/SceneGraph/MaterialRenderList.cpp +++ b/src/SceneGraph/MaterialRenderList.cpp @@ -128,10 +128,10 @@ void MaterialRenderList::Stat() const uint count=rn_list.GetCount(); RenderNode *rn=rn_list.GetData(); - ri_list.ClearData(); + ri_list.Clear(); ri_list.PreAlloc(count); - mi_set.ClearData(); + mi_set.Clear(); RenderItem *ri=ri_list.GetData(); diff --git a/src/SceneGraph/TileData.cpp b/src/SceneGraph/TileData.cpp index e9fd6d23..aab8cb28 100644 --- a/src/SceneGraph/TileData.cpp +++ b/src/SceneGraph/TileData.cpp @@ -25,14 +25,14 @@ namespace hgl to_pool.PreAlloc(tile_max_count); { int col=0,row=0; - TileObject **to=to_pool.GetInactiveData(); + TileObject *to=new TileObject; for(uint i=0;icol =col; - (*to)->row =row; + to->col =col; + to->row =row; - (*to)->uv_pixel.Set(col*tile_width, + to->uv_pixel.Set(col*tile_width, row*tile_height, 0, 0); @@ -45,6 +45,8 @@ namespace hgl ++row; col=0; } + + to_pool.AppendToIdle(to); } } @@ -63,7 +65,7 @@ namespace hgl void TileData::BeginCommit() { - commit_list.ClearData(); + commit_list.Clear(); commit_ptr=(uint8 *)tile_buffer->Map(); } @@ -82,7 +84,7 @@ namespace hgl const int result=commit_list.GetCount(); - commit_list.ClearData(); + commit_list.Clear(); return result; } diff --git a/src/SceneGraph/Vulkan/VKDescriptorSet.cpp b/src/SceneGraph/Vulkan/VKDescriptorSet.cpp index b821af76..f5df71e6 100644 --- a/src/SceneGraph/Vulkan/VKDescriptorSet.cpp +++ b/src/SceneGraph/Vulkan/VKDescriptorSet.cpp @@ -69,10 +69,10 @@ namespace void DescriptorSet::Clear() { - buffer_list.ClearData(); - image_list.ClearData(); - wds_list.ClearData(); - binded_sets.ClearData(); + buffer_list.Clear(); + image_list.Clear(); + wds_list.Clear(); + binded_sets.Clear(); is_dirty=true; }