feat: canvas from texture atlas element

This commit is contained in:
MihailRis
2025-11-05 00:20:58 +03:00
parent 497160a5b9
commit d9f2d54bf0
10 changed files with 126 additions and 28 deletions
+8
View File
@@ -49,6 +49,14 @@ ImageData* Atlas::getImage() const {
return image.get();
}
std::shared_ptr<Texture> Atlas::shareTexture() const {
return texture;
}
std::shared_ptr<ImageData> Atlas::shareImageData() const {
return image;
}
void AtlasBuilder::add(const std::string& name, std::unique_ptr<ImageData> image) {
entries.push_back(atlasentry{name, std::shared_ptr<ImageData>(image.release())});
names.insert(name);