mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-05 10:16:54 +08:00
parent
fc92128519
commit
ba60fb99bd
@ -150,6 +150,7 @@ void CCSkeleton::draw () {
|
|||||||
Slot* slot = skeleton->drawOrder[i];
|
Slot* slot = skeleton->drawOrder[i];
|
||||||
if (!slot->attachment || slot->attachment->type != ATTACHMENT_REGION) continue;
|
if (!slot->attachment || slot->attachment->type != ATTACHMENT_REGION) continue;
|
||||||
RegionAttachment* attachment = (RegionAttachment*)slot->attachment;
|
RegionAttachment* attachment = (RegionAttachment*)slot->attachment;
|
||||||
|
|
||||||
CCTextureAtlas* regionTextureAtlas = getTextureAtlas(attachment);
|
CCTextureAtlas* regionTextureAtlas = getTextureAtlas(attachment);
|
||||||
if (regionTextureAtlas != textureAtlas) {
|
if (regionTextureAtlas != textureAtlas) {
|
||||||
if (textureAtlas) {
|
if (textureAtlas) {
|
||||||
@ -158,8 +159,14 @@ void CCSkeleton::draw () {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
textureAtlas = regionTextureAtlas;
|
textureAtlas = regionTextureAtlas;
|
||||||
|
|
||||||
int quadCount = textureAtlas->getTotalQuads();
|
int quadCount = textureAtlas->getTotalQuads();
|
||||||
if (textureAtlas->getCapacity() == quadCount && !textureAtlas->resizeCapacity(textureAtlas->getCapacity() * 2)) return;
|
if (textureAtlas->getCapacity() == quadCount) {
|
||||||
|
textureAtlas->drawQuads();
|
||||||
|
textureAtlas->removeAllQuads();
|
||||||
|
if (!textureAtlas->resizeCapacity(textureAtlas->getCapacity() * 2)) return;
|
||||||
|
}
|
||||||
|
|
||||||
RegionAttachment_updateQuad(attachment, slot, &quad, premultipliedAlpha);
|
RegionAttachment_updateQuad(attachment, slot, &quad, premultipliedAlpha);
|
||||||
textureAtlas->updateQuad(&quad, quadCount);
|
textureAtlas->updateQuad(&quad, quadCount);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user