Hi guys,
I am having a weird problem when I build a cook triangle mesh. It seems that it is crashing when the number of triangles are big. It only happens in debug (CHECKED), not in release libs, the really strange point is that if I got the remote debugger enabled the crash doesn’t happen.
Any idea about what could be causing this strange issue?
PD: The version I am using is 3.3.0 , and this is the code I am using to create the triangle mesh, and the mesh seems to be created properly on the remote debugger.
physx::PxTriangleMeshDesc triangleMeshDesc;
triangleMeshDesc.points.count = static_cast<physx::PxU32> (numVertices);
triangleMeshDesc.points.stride = sizeof(float) * 3;
triangleMeshDesc.points.data = tempVertices;
triangleMeshDesc.triangles.count = static_cast<physx::PxU32> (numTriangles);
triangleMeshDesc.triangles.stride = 3 * sizeof(uint32);
triangleMeshDesc.triangles.data = indices;
if (triangleMeshDesc.isValid())
{
Ogre::LogManager::getSingletonPtr()->logMessage("trianglemeshdesc OK!");
MemoryWriteBuffer buf;
if(bool results = mCooking->cookTriangleMesh(triangleMeshDesc, buf))
{
Ogre::LogManager::getSingletonPtr()->logMessage("nxcooking results: " + Ogre::StringConverter::toString(results));
MemoryReadBuffer readBuffer(buf.data);
triMesh = mPhysicsSDK->createTriangleMesh(readBuffer);
}
}
else
Ogre::LogManager::getSingletonPtr()->logMessage( "trianglemeshdesc invalid!!!" );
delete []tempVertices;
return triMesh;