Hello,
For the argument of 3*sizeof(int), why I can't load the Mesh Shape in 16bit format for the index.
If I load the mesh with 32bit index and the mesh has less than 65535 indices, it will overflow the vertex buffer.
I have tried to use 3* sizeof(WORD) as index stride and I can't put (WORD*)pIndexData, because bullet won't recognize the prototype,
Any ideas?
Thanks
Jack
indexVertexArrays =
new btTriangleIndexVertexArray(pMesh->GetNumFaces(),
(int*)pIndexData, 3 * sizeof(int), pMesh->GetNumVertices(),
(btScalar*)pVertexData, dwVertexSize);
// For non-moving objects only
staticShape = new btBvhTriangleMeshShape(indexVertexArrays, true);
↧