#pragma once #include #include #include "../Core/Core.h" class Material; // TODO: Should probably be static. class MaterialManager { private: static Ref s_Instance; std::map> m_Materials; // TODO: Pile of crap Material* ParseMaterialFile(const std::string path); void SaveMaterialFile(const std::string path, Material* material); bool IsMaterialLoaded(const std::string path); public: MaterialManager(); void LoadMaterials(); void RegisterMaterial(Ref material); Ref LoadMaterial(const std::string path); Ref GetMaterial(const std::string name); std::map> GetAllMaterials(); static Ref Get() { if (!s_Instance) s_Instance = CreateRef(); return s_Instance; } };