From afcac59c7d04f4337d6b04ebed8cac7e871ccc50 Mon Sep 17 00:00:00 2001 From: rtk0c Date: Fri, 15 Apr 2022 20:30:39 -0700 Subject: Changeset: 7 Work on Material system --- source/Texture.hpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'source/Texture.hpp') diff --git a/source/Texture.hpp b/source/Texture.hpp index c372998..c330bb3 100644 --- a/source/Texture.hpp +++ b/source/Texture.hpp @@ -2,6 +2,7 @@ #include "RcPtr.hpp" +#include #include #include #include @@ -64,3 +65,17 @@ struct Subregion { struct TextureSubregion : public Subregion { RcPtr atlasTexture; }; + +class TextureManager { +public: + static inline TextureManager* instance = nullptr; + +private: + absl::flat_hash_map> mTextures; + +public: + void DiscoverTextures(); + + const auto& GetTextures() const { return mTextures; } + Texture* FindTexture(std::string_view name); +}; -- cgit v1.2.3-70-g09d2