mirror of
https://github.com/Relintai/texture_packer.git
synced 2024-11-08 10:02:11 +01:00
TextureMerger's set_textures will now clean up textures in the packer properly.
This commit is contained in:
parent
7804575cf6
commit
4bdea3cc56
@ -57,6 +57,10 @@ Vector<Variant> TextureMerger::get_textures() {
|
|||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
void TextureMerger::set_textures(const Vector<Variant> &textures) {
|
void TextureMerger::set_textures(const Vector<Variant> &textures) {
|
||||||
|
for (int i = 0; i < _textures.size(); ++i) {
|
||||||
|
_packer->unref_texture(_textures[i]);
|
||||||
|
}
|
||||||
|
|
||||||
_textures.clear();
|
_textures.clear();
|
||||||
_textures.resize(textures.size());
|
_textures.resize(textures.size());
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user