| 24 | static std::set<BoxedTexture*> textures; |
| 25 | |
| 26 | void BoxedTexture::resetAll() { |
| 27 | for (auto& t : textures) { |
| 28 | t->unload(); |
| 29 | } |
| 30 | textures.clear(); |
| 31 | } |
| 32 | |
| 33 | BoxedTexture::BoxedTexture(std::function<void* ()> loadTexture) : texture(nullptr), loadTexture(loadTexture) { |
| 34 | textures.insert(this); |