38 inline void unload()
override { this->_group.clear(); }
40 [[nodiscard]]
inline virtual bool duplicate(BaseDataBlock& block)
const override
42 auto& castedBlock =
dynamic_cast<DataBlock&
>(block);
43 if (!BaseDataBlock::duplicate(castedBlock))
47 castedBlock._group.clear();
48 for (
auto& group: this->_group)
50 castedBlock._group.emplace_back(std::make_shared<TextureType>(*group));
52 castedBlock._group = this->_group;
56 std::vector<DataPointer> _group;
Manage textures.
Definition texture_manager.hpp:69
bool loadFromSurface(std::string_view name, fge::Surface const &surface)
Load a texture from a surface.
bool loadFromFile(std::string_view name, std::filesystem::path const &path)
Load a texture from a file.
bool loadToGroupFromSurface(std::string_view name, fge::Surface const &surface) const
Load a texture from a surface and add it to a group.
bool initialize() override
Initialize the manager.
Definition texture_manager.hpp:37