mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-11-21 01:49:44 +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
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue