Hi,
I can't make proper mesh animation on cocos2d-iphone v 2.2 64bit (downloaded from official site)
(I got Spine Runtime from repo v2.2 branch)
Simple animation is OK (spineboy)
But goblins-mesh and my own animation that used mash animation is wrong. (see screenshot attached)
It runs on iOS Simulator with wrong texturing and crashed on real devices on this line (spPolygonBatch class):
glDrawElements(GL_TRIANGLES, _trianglesCount, GL_UNSIGNED_SHORT, _triangles);
bad_exc error.
But _trianglesCount is reasonable value and _triangles is also a valid array with values.
Also I tried the same spine-c runtime with cocos2f-iphone 3.3 and it's OK.
Unfortunately, I can't move to new version of cocos because my project is too large.
Please advice
Figured out it myself
I have changed type of triangles array in spPolygonBatch to unsigned short* in function
- (void) add:(CCTexture2D*)addTexture vertices:(const float*)addVertices uvs:(const float*)uvs
verticesCount:(int)addVerticesCount triangles:(unsigned short*)addTriangles trianglesCount:(int)addTrianglesCount
color:(ccColor4B*)color