#include "TextureManager.h" #include "../Rendering/Textures/Texture.h" std::map> TextureManager::m_Registry; TextureManager* TextureManager::s_Instance = nullptr; bool TextureManager::IsTextureLoaded(const std::string path) { return m_Registry.find(path) != m_Registry.end(); } Ref TextureManager::GetTexture(const std::string path) { if (!IsTextureLoaded(path)) m_Registry.emplace(path, new Texture(path)); return m_Registry.at(path); } TextureManager* TextureManager::Get() { return s_Instance; } TextureManager::TextureManager() { s_Instance = this; }