mirror of
https://github.com/edubart/otclient.git
synced 2025-12-23 00:27:12 +01:00
merge total remake
This commit is contained in:
21
src/framework/graphics/texturemanager.h
Normal file
21
src/framework/graphics/texturemanager.h
Normal file
@@ -0,0 +1,21 @@
|
||||
#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
|
||||
Reference in New Issue
Block a user