From d1c812f1162e5fdb13c215792725b2591d7428f5 Mon Sep 17 00:00:00 2001 From: Sheikh Dawood Abdul Ajees Date: Fri, 15 Sep 2017 15:41:57 -0500 Subject: PhysX 3.4.1, APEX 1.4.1 Release @22845541 --- PhysX_3.4/Source/PhysXCooking/src/Cooking.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'PhysX_3.4/Source/PhysXCooking/src/Cooking.cpp') 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) { -- cgit v1.2.3