mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-09 04:51:49 +00:00
'Assets', some refactor
This commit is contained in:
parent
b7e8ff5bea
commit
2aba3e91db
19 changed files with 350 additions and 213 deletions
22
src/Assets.h
Normal file
22
src/Assets.h
Normal 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_ */
|
||||
Loading…
Add table
Add a link
Reference in a new issue