3 #include <unordered_map> 102 static std::string
initialiseHeightmap(std::string heightmapFileName, std::string textureFileName);
124 static std::string
initialiseMesh(std::string objFileName, std::string textureFileName);
132 static std::string
initialiseShader(std::string vertexShaderFileName, std::string fragmentShaderFileName);
188 static std::unordered_map<std::string, Mesh*>
meshes;
190 static std::unordered_map<std::string, Shader*>
shaders;
192 static std::unordered_map<std::string, Audio*>
audio;
194 static std::unordered_map<std::string, Music*>
music;
196 static std::unordered_map<std::string, Sprite*>
sprites;
static Shader * getShaders(std::string id)
A static function to get an shaders.
Definition: ResourceManager.h:165
Creates an object from an text file, this can then be used with OpenGL.
Definition: Mesh.h:11
static std::unordered_map< std::string, Mesh * > meshes
The loaded Mesh files.
Definition: ResourceManager.h:188
static Mesh * getMesh(std::string id)
A static function to get a mesh.
Definition: ResourceManager.h:159
static void deleteAllShaders()
A static function to delete all the shaders.
Definition: ResourceManager.cpp:31
static std::string initialiseHeightmap(std::string heightmapFileName)
A static function to initialise a heightmap.
Definition: ResourceManager.cpp:99
static void deleteAudio(std::string id)
A static function to delete the audio.
Definition: ResourceManager.h:70
static std::unordered_map< std::string, Music * > music
The loaded Music files.
Definition: ResourceManager.h:194
static void deleteSprite(std::string id)
A static function to delete the sprite.
Definition: ResourceManager.h:76
static std::string initialiseSprite(std::string spriteFileName)
A static function to initialise a sprite.
Definition: ResourceManager.cpp:227
static void deleteAllAudio()
A static function to delete all the audio.
Definition: ResourceManager.cpp:40
static void deleteAllMeshes()
A static function to delete all the meshes.
Definition: ResourceManager.cpp:22
static void deleteShader(std::string id)
A static function to delete the shader.
Definition: ResourceManager.h:58
static void deleteResources()
A static function to delete all the resources.
Definition: ResourceManager.cpp:13
static void deleteAllSprites()
A static function to delete all the sprites.
Definition: ResourceManager.cpp:58
Handles music using SDL_Mixer.
Definition: Music.h:9
static std::string initialiseShader(std::string vertexShaderFileName, std::string fragmentShaderFileName)
A static function to initialise a shader.
Definition: ResourceManager.cpp:173
Creates a Sprite for use with 2D.
Definition: Sprite.h:11
static std::unordered_map< std::string, Sprite * > sprites
The loaded Sprite files.
Definition: ResourceManager.h:196
static void stopAllMusic()
A static function to stop all music.
Definition: ResourceManager.cpp:72
static Audio * getAudio(std::string id)
A static function to get an audio.
Definition: ResourceManager.h:171
static std::string initialiseMusic(std::string musicFileName)
A static function to initialise a music file.
Definition: ResourceManager.cpp:210
static std::string initialiseMesh(std::string objFileName)
A static function to initialise a mesh without a texture.
Definition: ResourceManager.cpp:136
Creates a Shader from an text file, this can then be used with OpenGL.
Definition: Shader.h:10
static std::string initialisePrimitive(Primitives::PrimativeType primType)
A static function to initialise a primative.
Definition: ResourceManager.cpp:80
PrimativeType
Definition: Primitives.h:13
static void deleteAllMusic()
A static function to delete all the music.
Definition: ResourceManager.cpp:49
static std::unordered_map< std::string, Audio * > audio
The loaded Audio files.
Definition: ResourceManager.h:192
static void deleteMusic(std::string id)
A static function to delete the music.
Definition: ResourceManager.h:64
static Music * getMusic(std::string id)
A static function to get an music.
Definition: ResourceManager.h:177
static void stopMusic(std::string id)
A static function to stop the music.
Definition: ResourceManager.cpp:67
static std::string initialiseAudio(std::string audioFileName)
A static function to initialise an audio file.
Definition: ResourceManager.cpp:193
static void deleteMesh(std::string id)
A static function to delete the mesh.
Definition: ResourceManager.h:52
static Sprite * getSprite(std::string id)
A static function to get a sprite.
Definition: ResourceManager.h:183
Contains static variables and functions for use with resource manager.
Definition: ResourceManager.h:14
static std::unordered_map< std::string, Shader * > shaders
The loaded Shader files.
Definition: ResourceManager.h:190
Handles audio using SDL_Mixer.
Definition: Audio.h:9