Provide explicit argument for asset cache ID.
This will allow assets to cache compiled results with different parameters. For example, we could cache both an RGB version of a texture and a Mono version. PiperOrigin-RevId: 811341377 Change-Id: Ifd6a4ff88661a2b38be47c02d6a666de2c202885
This commit is contained in:
committed by
Copybara-Service
parent
0baac58999
commit
922aebbeed
@@ -513,7 +513,7 @@ void mjCMesh::CacheMesh(mjCCache* cache, const mjResource* resource) {
|
||||
const mjCMesh* mesh = static_cast<const mjCMesh*>(data);
|
||||
delete mesh;
|
||||
});
|
||||
cache->Insert("", resource, cached_data, size);
|
||||
cache->Insert("", resource->name, resource, cached_data, size);
|
||||
}
|
||||
|
||||
namespace {
|
||||
@@ -1231,7 +1231,7 @@ bool mjCMesh::LoadCachedMesh(mjCCache *cache, const mjResource* resource) {
|
||||
};
|
||||
|
||||
// check that cached asset has all data
|
||||
return cache->PopulateData(resource, process_mesh);
|
||||
return cache->PopulateData(resource->name, resource, process_mesh);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user