Add MeshBase as shared impl part for Mesh and SkinnedMesh

This commit is contained in:
Wojtek Figat
2021-03-30 17:57:53 +02:00
parent 3e1356ba2d
commit e01a0585a8
11 changed files with 272 additions and 256 deletions

View File

@@ -218,7 +218,7 @@ bool SkinnedMesh::DownloadDataGPU(MeshBufferType type, BytesContainer& result) c
return buffer && buffer->DownloadData(result);
}
Task* SkinnedMesh::DownloadDataAsyncGPU(MeshBufferType type, BytesContainer& result) const
Task* SkinnedMesh::DownloadDataGPUAsync(MeshBufferType type, BytesContainer& result) const
{
GPUBuffer* buffer = nullptr;
switch (type)
@@ -535,7 +535,7 @@ bool SkinnedMesh::DownloadBuffer(bool forceGpu, MonoArray* resultObj, int32 type
{
// Get data from GPU
// TODO: support reusing the input memory buffer to perform a single copy from staging buffer to the input CPU buffer
auto task = mesh->DownloadDataAsyncGPU(bufferType, data);
auto task = mesh->DownloadDataGPUAsync(bufferType, data);
if (task == nullptr)
return true;
task->Start();