gltfio: Clear texture caches before loading resources (#5580)
* gltfio: Clear texture caches before loading resources * iOS gltf-viewer: add double-tap to reload model for debugging * iOS samples: add instructions on ASan / UBSan debugging
This commit is contained in:
@@ -342,6 +342,11 @@ bool ResourceLoader::loadResources(FFilamentAsset* asset, bool async) {
|
||||
SYSTRACE_CONTEXT();
|
||||
SYSTRACE_ASYNC_END("addResourceData", 1);
|
||||
|
||||
// Clear our texture caches. Previous calls to loadResources may have populated these, but the
|
||||
// Texture objects could have since been destroyed.
|
||||
pImpl->mBufferTextureCache.clear();
|
||||
pImpl->mFilepathTextureCache.clear();
|
||||
|
||||
if (asset->mResourcesLoaded) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user