aboutsummaryrefslogtreecommitdiff
path: root/PhysX_3.4/Source/PhysXCooking/src/Cooking.cpp
diff options
context:
space:
mode:
authorSheikh Dawood Abdul Ajees <[email protected]>2017-09-15 15:41:57 -0500
committerSheikh Dawood Abdul Ajees <[email protected]>2017-09-15 15:41:57 -0500
commitd1c812f1162e5fdb13c215792725b2591d7428f5 (patch)
tree407056c45c7e9320c48fca6a3697d81a061c4ea0 /PhysX_3.4/Source/PhysXCooking/src/Cooking.cpp
parentPhysX 3.4, APEX 1.4 patch release @22121272 (diff)
downloadphysx-3.4-d1c812f1162e5fdb13c215792725b2591d7428f5.tar.xz
physx-3.4-d1c812f1162e5fdb13c215792725b2591d7428f5.zip
PhysX 3.4.1, APEX 1.4.1 Release @22845541v3.4.1
Diffstat (limited to 'PhysX_3.4/Source/PhysXCooking/src/Cooking.cpp')
-rw-r--r--PhysX_3.4/Source/PhysXCooking/src/Cooking.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/PhysX_3.4/Source/PhysXCooking/src/Cooking.cpp b/PhysX_3.4/Source/PhysXCooking/src/Cooking.cpp
index fc23c0eb..fe580659 100644
--- a/PhysX_3.4/Source/PhysXCooking/src/Cooking.cpp
+++ b/PhysX_3.4/Source/PhysXCooking/src/Cooking.cpp
@@ -219,6 +219,15 @@ bool Cooking::cookConvexMeshInternal(const PxConvexMeshDesc& desc_, ConvexMeshBu
{
PX_ASSERT(hullLib);
+ // clean up the indices information, it could have been set by accident
+ desc.flags &= ~PxConvexFlag::e16_BIT_INDICES;
+ desc.indices.count = 0;
+ desc.indices.data = NULL;
+ desc.indices.stride = 0;
+ desc.polygons.count = 0;
+ desc.polygons.data = NULL;
+ desc.polygons.stride = 0;
+
PxConvexMeshCookingResult::Enum res = hullLib->createConvexHull();
if (res == PxConvexMeshCookingResult::eSUCCESS || res == PxConvexMeshCookingResult::ePOLYGONS_LIMIT_REACHED)
{