cleanup texures on cache destruction

This commit is contained in:
Green Sky 2023-08-02 15:37:37 +02:00
parent 2dba4f8fbb
commit e362af8271
No known key found for this signature in database

View File

@ -99,6 +99,14 @@ struct TextureCache {
//_default_texture = loadTestWebPAnim(); //_default_texture = loadTestWebPAnim();
} }
~TextureCache(void) {
for (const auto& it : _cache) {
for (const auto& tex_id : it.second.textures) {
_tu.destroy(tex_id);
}
}
}
struct GetInfo { struct GetInfo {
TextureType id; TextureType id;
uint32_t width; uint32_t width;