Quantcast
Channel: GameDev.net
Viewing all articles
Browse latest Browse all 17825

[Bullet] Adding Static Meshes into btBvhTriangleMeshShape that have more than 65535 indices?

$
0
0
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);

Viewing all articles
Browse latest Browse all 17825

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>