You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
446 B

#ifndef TEXTUREMANAGER_H
#define TEXTUREMANAGER_H
#include "texture.h"
class TextureManager
{
public:
/// Load a texture from file, if is already loaded, it will be retrieved from cache
TexturePtr getTexture(const std::string& textureFile);
/// Load a png textures
static TexturePtr loadPNG(std::stringstream& file);
private:
std::map<std::string, TextureWeakPtr> m_textures;
};
extern TextureManager g_textures;
#endif