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

View file

@ -14,8 +14,8 @@ class ImageData;
class Texture;
class Atlas {
std::unique_ptr<Texture> texture;
std::unique_ptr<ImageData> image;
std::shared_ptr<Texture> texture;
std::shared_ptr<ImageData> image;
std::unordered_map<std::string, UVRegion> regions;
public:
/// @param image atlas raster
@ -36,6 +36,9 @@ public:
Texture* getTexture() const;
ImageData* getImage() const;
std::shared_ptr<Texture> shareTexture() const;
std::shared_ptr<ImageData> shareImageData() const;
};
struct atlasentry {