I'm writing one of those circular progress bars using mesh and it works fine until adding around 47th item. Each loop I call clearTextureCoordinateArray() before calling a series of setTextureCoordinate() which eventually crashes.
If I add resizeTextureCoordinateArray() after the clear then it all works fine.
self.m_timerMesh:clearTextureCoordinateArray()
self.m_timerMesh:resizeTextureCoordinateArray(200)
According to this page:
https://wiki.giderosmobile.com/index.php/Mesh:setTextureCoordinateIndices start from 1. If the texture coordinate array is not large enough, it is automatically expanded.
That does not seem to be the case here.
Comments
That may be the issue here?
Likes: MoKaLux, hgy29
- you attempt to set texture coordinate at an index below 1 (I will add a check for this in the code, but I doubt this is your issue)
- your indices array contains an index pointing outside your texture (or vertex, or color) array while rendering the frame. This is the case @MoKaLux mentionned.
So since your clear your texture coordinates and fill them up afterwise, do you also clear your index array at the same time ?