You can iterate through all attachments in a skin and count the vertices and indices of each. For RegionAttachment, the vertex count is 4 and the index count is 6 (triangle list). For MeshAttachment, you can find the number of vertices via MeshAttachment::getWorldVerticesLength()
and divide it by 2. The index count is given via MeshAttachment::getTriangles()::size()
.
That will give you a good approximation of the maximally possible number of vertices and indices. However, if you plan on batching across skeletons, I'd suggest you write a sprite batcher that will automatically grow the vertex buffer.