Quantcast
Channel: Cocos Forums - Latest topics
Viewing all articles
Browse latest Browse all 17076

Spine - Batch all Skeletons / Sprites from one atlas

$
0
0

@framusrock wrote:

Hey,

I just recently started using Spine. Is it possible to batch draw all SkeletonAnimations from one texture atlas?

I've got multiple different sprites with animations from Spine and I want to draw them all in one draw call.

How can I achieve this?

Here's my code that results in two draw calls:

    nodeA = SkeletonAnimation::createWithFile("fileA.json", "myatlas.atlas");
    nodeA->setPosition(Vec2(180, 180));
    addChild(nodeA);
    nodeA->setScale(0.5);

    nodeB = SkeletonAnimation::SkeletonAnimation::createWithFile("fileB.json", "myatlas.atlas");
    nodeB->setPosition(Vec2(180, 180));
    addChild(nodeB);
    nodeB->setScale(0.5);

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 17076

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>