add avatar texture handling

This commit is contained in:
2023-08-01 18:25:56 +02:00
parent 2e28ad7bb9
commit 95b77cb696
5 changed files with 99 additions and 6 deletions

View File

@@ -136,14 +136,18 @@ struct TextureCache {
}
}
invalidate(to_purge);
_default_texture.doAnimation(ts_now);
}
void invalidate(const std::vector<KeyType>& to_purge) {
for (const auto& key : to_purge) {
for (const auto& tex_id : _cache.at(key).textures) {
_tu.destroy(tex_id);
}
_cache.erase(key);
}
_default_texture.doAnimation(ts_now);
}
void workLoadQueue(void) {