forked from Green-Sky/tomato
cleanup texures on cache destruction
This commit is contained in:
parent
2dba4f8fbb
commit
e362af8271
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user