diff options
Diffstat (limited to 'source/rendering/StarAssetTextureGroup.hpp')
-rw-r--r-- | source/rendering/StarAssetTextureGroup.hpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/source/rendering/StarAssetTextureGroup.hpp b/source/rendering/StarAssetTextureGroup.hpp index 0941ad0..205a321 100644 --- a/source/rendering/StarAssetTextureGroup.hpp +++ b/source/rendering/StarAssetTextureGroup.hpp @@ -6,6 +6,7 @@ #include "StarBiMap.hpp" #include "StarListener.hpp" #include "StarRenderer.hpp" +#include "StarAssetPath.hpp" namespace Star { @@ -20,14 +21,14 @@ public: // Load the given texture into the texture group if it is not loaded, and // return the texture pointer. - TexturePtr loadTexture(String const& imageName); + TexturePtr loadTexture(AssetPath const& imagePath); // If the texture is loaded and ready, returns the texture pointer, otherwise // queues the texture using Assets::tryImage and returns nullptr. - TexturePtr tryTexture(String const& imageName); + TexturePtr tryTexture(AssetPath const& imagePath); // Has the texture been loaded? - bool textureLoaded(String const& imageName) const; + bool textureLoaded(AssetPath const& imagePath) const; // Frees textures that haven't been used in more than 'textureTimeout' time. // If Root has been reloaded, will simply clear the texture group. @@ -37,10 +38,10 @@ private: // Returns the texture parameters. If tryTexture is true, then returns none // if the texture is not loaded, and queues it, otherwise loads texture // immediately - TexturePtr loadTexture(String const& imageName, bool tryTexture); + TexturePtr loadTexture(AssetPath const& imagePath, bool tryTexture); TextureGroupPtr m_textureGroup; - StringMap<pair<TexturePtr, int64_t>> m_textureMap; + HashMap<AssetPath, pair<TexturePtr, int64_t>> m_textureMap; HashMap<ImageConstPtr, TexturePtr> m_textureDeduplicationMap; TrackerListenerPtr m_reloadTracker; }; |