Skip to content

Commit

Permalink
Improvement: upload mesh data instantly and make it no longer readabl…
Browse files Browse the repository at this point in the history
…e (frees up more memory).
  • Loading branch information
atteneder committed Aug 1, 2020
1 parent 39d816d commit 7fd3457
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Runtime/Scripts/PrimitiveCreateContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,10 @@ public override bool IsCompleted {
}
Profiler.EndSample();

Profiler.BeginSample("UploadMeshData");
msh.UploadMeshData(true);
Profiler.EndSample();

Profiler.BeginSample("Dispose");
Dispose();
Profiler.EndSample();
Expand Down
4 changes: 4 additions & 0 deletions Runtime/Scripts/PrimitiveDracoCreateContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ public override bool IsCompleted {
Profiler.EndSample();
}

Profiler.BeginSample("UploadMeshData");
mesh.UploadMeshData(true);
Profiler.EndSample();

return new Primitive(mesh,materials);
}
}
Expand Down

0 comments on commit 7fd3457

Please sign in to comment.