jubilant-funicular
Static Public Member Functions | Static Private Attributes | List of all members
nta::ResourceManager Class Reference

#include <ResourceManager.h>

Collaboration diagram for nta::ResourceManager:
Collaboration graph
[legend]

Static Public Member Functions

static Result< RawTexturegetTexture (crstring imagePath, crvec2 dimensions)
 returns the resource with the given path, loading it if need be
 
static Result< TTF_Font * > getFont (crstring fontPath, int fontSize)
 
static void destroy ()
 

Static Private Attributes

static std::map< std::string, RawTexturem_textureMap
 a map for associating a texture with the name of its file
 
static std::map< std::pair< std::string, int >, TTF_Font * > m_fontMap
 

Detailed Description

Responsible for loading and caching external files, so they are only loaded in once during program execution. In general, you you probably don't want to use ResourceManager directly, but instead use ContextData.

Todo:
Map from Path instead of std::string

Definition at line 16 of file ResourceManager.h.


The documentation for this class was generated from the following files: