Hi guys! The Spine runtime for cocos2dx uses CCTextureAtlas for drawing [1]. This seems to fail on certain Android devices [2], where failure is that only some quads are drawn. We found that if we call drawQuads after every updateQuad then it draws all quads as expected. This seems to indicate that CCTextureAtlas batching and/or drawing is broken somehow for certain Android devices. Does anyone have any insight on what the issue might be?
I have tried the following compile flags, but they did not help resolve the issue:
~~DCC_TEXTURE_ATLAS_USE_TRIANGLE_STRIP doesn’t help
~~DCC_REBIND_INDICES_BUFFER doesn’t help
* both flags together don’t help
The problem is solved if its the CCTextureAtlas capacity is set to some larger number (like 128, as opposed to 4): CCTextureAtlas* textureAtlas = CCTextureAtlas::createWithTexture(texture, 128);
It seems that the problem might be somewhere in CCTextureAtlas::resizeCapacity() since any time that gets called the problem seems to occur.
This should have been fixed as Chad Ata mentioned. Make sure the line in spine-cocos2dx.cpp has 128 as it does in Chad Ata’s post. You could also try increasing it.
This should have been fixed as Chad Ata mentioned. Make sure the line in spine-cocos2dx.cpp has 128 as it does in Chad Ata’s post. You could also try increasing it.
I was set to 4 in my source, must be the default for 2.2 Cocos2d-x.
The setting of 4 was working on 45 Androids and 6 iOS devices during our testing. It was not working on the Adreno 200 GPU on 2 devices.
I have set it to 128. I am curious, and will be digging into it myself, what we’re allocating here with that 128. Sounds like a lot