37
// id, width, height, texture
38
typedef sigc::slot<void, const char *, int, int, nux::BaseTexture **> CreateTextureCallback;
37
// id, width, height, texture
38
typedef sigc::slot<void, const char*, int, int, nux::BaseTexture**> CreateTextureCallback;
40
40
/* don't new this class, use getdefault */
42
static TextureCache * GetDefault ();
43
nux::BaseTexture * FindTexture (const char *texture_id, int width, int height, CreateTextureCallback callback);
42
static TextureCache* GetDefault();
43
nux::BaseTexture* FindTexture(const char* texture_id, int width, int height, CreateTextureCallback callback);
48
char * Hash (const char *id, int width, int height);
49
std::map<std::string, nux::BaseTexture *> _cache;
50
std::map<nux::BaseTexture *, std::string> _cache_inverse; // just for faster lookups
51
std::map<nux::BaseTexture *, sigc::connection> _cache_con; // track our connections
52
void OnDestroyNotify (nux::Trackable *Object);
48
char* Hash(const char* id, int width, int height);
49
std::map<std::string, nux::BaseTexture*> _cache;
50
std::map<nux::BaseTexture*, std::string> _cache_inverse; // just for faster lookups
51
std::map<nux::BaseTexture*, sigc::connection> _cache_con; // track our connections
52
void OnDestroyNotify(nux::Trackable* Object);
55
55
#endif // TEXTURECACHE_H