'Assets', some refactor

This commit is contained in:
MihailRis 2022-03-03 18:14:34 +03:00 • committed by GitHub
parent b7e8ff5bea
commit 2aba3e91db
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 350 additions and 213 deletions

22
src/Assets.h Normal file
View file

@ -0,0 +1,22 @@
#ifndef SRC_ASSETS_H_
#define SRC_ASSETS_H_
#include <string>
#include <unordered_map>
class Texture;
class Shader;
class Assets {
std::unordered_map<std::string, Texture*> textures;
std::unordered_map<std::string, Shader*> shaders;
public:
~Assets();
Texture* getTexture(std::string name);
void store(Texture* texture, std::string name);
Shader* getShader(std::string name);
void store(Shader* shader, std::string name);
};
#endif /* SRC_ASSETS_H_ */