// // Created by lukas on 06.02.22. // #include #include "TextureLoader.h" std::unordered_map TextureLoader::texts; Texture *TextureLoader::loadTexture(std::string path) { if (texts.find(path) != texts.end()) { return &texts[path]; } else { std::cout << "Loading texture: " << path << std::endl; auto *t = new Texture; t->load(path); t->Bind(); texts[path] = *t; return t; } }