mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-09 21:11:50 +00:00
add canvas:create_texture(...)
This commit is contained in:
parent
e1ee1d8a31
commit
f9c5bd5e4d
3 changed files with 31 additions and 0 deletions
|
|
@ -72,6 +72,11 @@ public:
|
|||
assets[typeid(T)][name].reset(asset.release());
|
||||
}
|
||||
|
||||
template <class T>
|
||||
void store(std::shared_ptr<T> asset, const std::string& name) {
|
||||
assets[typeid(T)][name] = std::move(asset);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
T* get(const std::string& name) const {
|
||||
const auto& mapIter = assets.find(typeid(T));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue