diff options
| author | Micha White <botahamec@outlook.com> | 2022-10-04 09:59:44 -0400 |
|---|---|---|
| committer | Micha White <botahamec@outlook.com> | 2022-10-04 09:59:44 -0400 |
| commit | 1169cf72ec435a495e1449bdf222bc0ccfd6f62a (patch) | |
| tree | 3e080b1731de16e3c9bb0c7e8844d21341258dc9 /src/texture.rs | |
| parent | 511d3873f5f567c97eecd69d186bb4f93f927d58 (diff) | |
Small optimization
Diffstat (limited to 'src/texture.rs')
| -rw-r--r-- | src/texture.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/texture.rs b/src/texture.rs index 9184304..f5d1c34 100644 --- a/src/texture.rs +++ b/src/texture.rs @@ -64,6 +64,7 @@ pub struct TextureAtlases<'a> { packer: MultiTexturePacker<'a, image::RgbaImage, TextureId>, width: u32, height: u32, + changed: bool, } impl<'a> Default for TextureAtlases<'a> { @@ -85,6 +86,7 @@ impl<'a> TextureAtlases<'a> { }), width, height, + changed: false, } } @@ -99,6 +101,7 @@ impl<'a> TextureAtlases<'a> { self.packer .pack_own(id, img) .map_err(TextureError::TextureTooLarge)?; + self.changed = true; Ok(id) } |
