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.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'source/Texture.cpp') diff --git a/source/Texture.cpp b/source/Texture.cpp index 968c4bc..08641e1 100644 --- a/source/Texture.cpp +++ b/source/Texture.cpp @@ -97,3 +97,16 @@ GLuint Texture::GetHandle() const { bool Texture::IsValid() const { return mHandle != 0; } + +void TextureManager::DiscoverTextures() { + // TODO +} + +Texture* TextureManager::FindTexture(std::string_view name) { + auto iter = mTextures.find(name); + if (iter != mTextures.end()) { + return iter->second.Get(); + } else { + return nullptr; + } +} -- cgit v1.2.3-70-g09d2