Singleton class which stores and manages resources like fonts and images.
More...
#include <ResourceManager.hpp>
|
std::shared_ptr< SDL_Texture > | LoadTexture (std::string filepath) |
|
std::shared_ptr< TTF_Font > | LoadFont (std::string filepath, int ptsize) |
|
Singleton class which stores and manages resources like fonts and images.
◆ LoadFont()
std::shared_ptr< TTF_Font > ResourceManager::LoadFont |
( |
std::string | filepath, |
|
|
int | ptsize ) |
|
inline |
Loads a font from disk into a TTF_Font
.
- Parameters
-
filepath | The name of the font file to load |
ptsize | The desired font size |
- Returns
- Shared pointer to the loaded font
◆ LoadTexture()
std::shared_ptr< SDL_Texture > ResourceManager::LoadTexture |
( |
std::string | filepath | ) |
|
|
inline |
Loads an image from disk into an SDL_Texture. Will load any image type supported by SDL_image.h
- Parameters
-
filepath | The name of the image file to load |
- Returns
- Shared pointer to the loaded texture
The documentation for this struct was generated from the following files: