mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-08 20:41:49 +00:00
feat: canvas from texture atlas element
This commit is contained in:
parent
497160a5b9
commit
d9f2d54bf0
10 changed files with 126 additions and 28 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue