optimize spine/dragonbones material update (#13416)

* optimize spine/dragonbones material update

* add material assets depends for dragonbones
This commit is contained in:
zhakesi
2022-11-18 10:15:40 +08:00
committed by GitHub
parent 0985cbe03e
commit 011a71f732
9 changed files with 78 additions and 14 deletions
@@ -558,6 +558,10 @@ void SkeletonCacheAnimation::setRenderEntity(cc::RenderEntity* entity) {
void SkeletonCacheAnimation::setMaterial(cc::Material *material) {
_material = material;
for (auto &item : _materialCaches) {
CC_SAFE_DELETE(item.second);
}
_materialCaches.clear();
}
cc::RenderDrawInfo* SkeletonCacheAnimation::requestDrawInfo(int idx) {