class EE::Graphics::GlobalTextureAtlas¶
Any TextureRegion that doesn’t belong to an specific TextureAtlas ( a real texture atlas texture ), goes here. This is useful to auto release the TextureRegions.
#include <globaltextureatlas.hpp> class GlobalTextureAtlas: public EE::Graphics::TextureAtlas { public: // construction ~GlobalTextureAtlas(); };
Inherited Members¶
public: // methods virtual T* add(T* resource); bool remove(T* resource, bool remove = true); bool removeById(const String::HashType& id, bool remove = true); bool removeByName(const std::string& name, bool remove = true); T* getByName(const std::string& name); T* getById(const String::HashType& id); Uint32 getCount(); Uint32 getCount(const std::string& name); Uint32 getCount(const String::HashType& id); bool exists(const std::string& name); bool existsId(const String::HashType& id); void destroy(); void printNames(); UnorderedMap<String::HashType, T*>& getResources(); const bool& isDestroying() const; template <typename Predicate> void each(Predicate pred) const; template <typename Predicate> void each(Predicate pred); template <typename Predicate> T* findIf(Predicate pred) const; template <typename Predicate> T* findIf(Predicate pred); static TextureAtlas* New(const std::string& name = ""); TextureRegion* add(TextureRegion* textureRegion); TextureRegion* add(const Uint32& TexId, const std::string& Name = ""); TextureRegion* add(const Uint32& TexId, const Rect& SrcRect, const std::string& Name = ""); TextureRegion* add(const Uint32& TexId, const Rect& SrcRect, const Sizef& DestSize, const std::string& Name = ""); TextureRegion* add(const Uint32& TexId, const Rect& SrcRect, const Sizef& DestSize, const Vector2i& Offset, const std::string& Name = ""); TextureRegion* add(Texture* tex, const std::string& Name = ""); TextureRegion* add(Texture* tex, const Rect& SrcRect, const std::string& Name = ""); TextureRegion* add(Texture* tex, const Rect& SrcRect, const Sizef& DestSize, const std::string& Name = ""); TextureRegion* add(Texture* tex, const Rect& SrcRect, const Sizef& DestSize, const Vector2i& Offset, const std::string& Name = ""); const std::string& getName() const; void setName(const std::string& name); const std::string& getPath() const; void setPath(const std::string& path); const String::HashType& getId() const; Uint32 getCount(); Texture* getTexture(const Uint32& texnum = 0) const; Uint32 getTexturesCount();