aboutsummaryrefslogtreecommitdiff
path: root/samples/SampleBase/blast/BlastAssetModel.cpp
diff options
context:
space:
mode:
authorBryan Galdrikian <[email protected]>2017-08-28 13:55:34 -0700
committerBryan Galdrikian <[email protected]>2017-08-28 13:55:34 -0700
commit1e887d827e65a084a0ad0ba933c61a8330aeee07 (patch)
tree1e2aab418dadd37f5dc0aae4d8b00e81d909fd24 /samples/SampleBase/blast/BlastAssetModel.cpp
parentRemoving ArtistTools and CurveEditor projects (diff)
downloadarchived-blast-1e887d827e65a084a0ad0ba933c61a8330aeee07.tar.xz
archived-blast-1e887d827e65a084a0ad0ba933c61a8330aeee07.zip
Candidate 1.1 release.
* SampleAssetViewer now unconditionally loads the commandline-defined asset. * Better error handling in AuthoringTool (stderr and user error handler). * More consistent commandline switches in AuthoringTool and ApexImporter (--ll, --tx, --px flags). * NvBlastExtAuthoring ** Mesh cleaner, tries to remove self intersections and open edges in the interior of a mesh. ** Ability to set interior material to existing (external) material, or a new material id. ** Material ID remapping API. ** Rotation of voronoi cells used for fracturing. * Fixed smoothing groups in FBX exporter code. * Impulse passing from parent to child chunks fixed. * Reading unskinned fbx meshes correctly. * Collision hull generation from fbx meshes fixed. * Win32/64 PerfTest crash fix.
Diffstat (limited to 'samples/SampleBase/blast/BlastAssetModel.cpp')
-rw-r--r--samples/SampleBase/blast/BlastAssetModel.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/samples/SampleBase/blast/BlastAssetModel.cpp b/samples/SampleBase/blast/BlastAssetModel.cpp
index 28ef44d..f0ca302 100644
--- a/samples/SampleBase/blast/BlastAssetModel.cpp
+++ b/samples/SampleBase/blast/BlastAssetModel.cpp
@@ -208,13 +208,14 @@ BlastAssetModel::BlastAssetModel(TkFramework& framework, PxPhysics& physics, PxC
physicsChunks[i].subchunkCount = (uint32_t)physicsSubchunks[i].size();
physicsChunks[i].subchunks = physicsSubchunks[i].data();
}
- if (hullsOffsets)
- {
- NVBLAST_FREE(hullsOffsets);
- }
- if (hulls)
+ if (hulls && hullsOffsets)
{
+ for (uint32_t h = 0; h < hullsOffsets[meshCount]; h++)
+ {
+ hulls[h]->release();
+ }
NVBLAST_FREE(hulls);
+ NVBLAST_FREE(hullsOffsets);
}
}
m_pxAsset = ExtPxAsset::create(tkAsset, physicsChunks.data(), (uint32_t)physicsChunks.size());