Harald
Thanks for reply.
MeshAttachment::getTriangles() seems work.
however, drawing mesh has problem.
the code right this. I draw attachment with like this, but mesh don't draw anything.
MeshAttachment* pMesh = (MeshAttachment*)pAttachment;
vecVertices.setSize(pMesh->getWorldVerticesLength() / 2, SpineVertex());
size_t iNumVertices = pMesh->getWorldVerticesLength() / 2;
pMesh->computeWorldVertices(*pSlot, 0, iNumVertices, &(vecVertices.buffer()->x), 0, 7);
pTexture = (CKTDXDeviceTexture*)((AtlasRegion*)pMesh->getRegion())->page->getRendererObject();
SetTexture(pTexture);
for (size_t j = 0, l = 0; j < iNumVertices; j++, l += 2)
{
SpineVertex& kVertex = vecVertices[j];
kVertex.z = 1.f;
kVertex.rhw = 1.f;
kVertex.color = ((int)(kTint.r * 255) << 24) | ((int)(kTint.g * 255) << 16) | ((int)(kTint.b * 255) << 8) | (int)(kTint.a * 255);
kVertex.u = pMesh->getUVs()[l];
kVertex.v = pMesh->getUVs()[l + 1];
}
unsigned short* indices = pMesh->getTriangles().buffer();
DrawIndexedPrimitiveUP(D3DPT_TRIANGLELIST, 0, iNumVertices, 2, indices, D3DFMT_INDEX16, vecVertices.buffer(), sizeof(SpineVertex));