mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-08 20:41:49 +00:00
Project structure update
This commit is contained in:
parent
d67c707916
commit
7730da0056
19 changed files with 58 additions and 62 deletions
27
src/assets/Assets.h
Normal file
27
src/assets/Assets.h
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
#ifndef ASSETS_ASSETS_H_
|
||||
#define ASSETS_ASSETS_H_
|
||||
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
|
||||
class Texture;
|
||||
class Shader;
|
||||
class Font;
|
||||
|
||||
class Assets {
|
||||
std::unordered_map<std::string, Texture*> textures;
|
||||
std::unordered_map<std::string, Shader*> shaders;
|
||||
std::unordered_map<std::string, Font*> fonts;
|
||||
public:
|
||||
~Assets();
|
||||
Texture* getTexture(std::string name) const;
|
||||
void store(Texture* texture, std::string name);
|
||||
|
||||
Shader* getShader(std::string name) const;
|
||||
void store(Shader* shader, std::string name);
|
||||
|
||||
Font* getFont(std::string name) const;
|
||||
void store(Font* font, std::string name);
|
||||
};
|
||||
|
||||
#endif /* ASSETS_ASSETS_H_ */
|
||||
Loading…
Add table
Add a link
Reference in a new issue