base
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
|
||||
class Texture;
|
||||
class Font;
|
||||
class MeshData;
|
||||
|
||||
// Owns every texture and font, so each file only loads once however many things use it.
|
||||
// Sounds are cached by SoundSystem, rigs and animations by CharacterManager.
|
||||
@@ -20,6 +21,9 @@ public:
|
||||
Texture* GetTexture(const std::string& path);
|
||||
Font* GetFont(const std::string& path);
|
||||
|
||||
// Every mesh in a model file merged into one, in the file's own units. nullptr if it can't be read.
|
||||
const MeshData* GetMeshData(const std::string& path);
|
||||
|
||||
// Not cached, every call makes a new texture that's free to be edited
|
||||
Texture* CreateTexture(int width, int height);
|
||||
Texture* CopyTexture(const Texture& source);
|
||||
@@ -27,6 +31,7 @@ public:
|
||||
private:
|
||||
std::unordered_map<std::string, Texture*> textures;
|
||||
std::unordered_map<std::string, Font*> fonts;
|
||||
std::unordered_map<std::string, MeshData*> meshes;
|
||||
std::vector<Texture*> createdTextures;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user