2011-06-14 14:31:25 +08:00
|
|
|
|
|
|
|
class CCTextureCache : public CCObject
|
|
|
|
{
|
2012-02-02 14:26:38 +08:00
|
|
|
CCTexture2D* addImage(const char* fileimage);
|
|
|
|
CCTexture2D* addUIImage(CCImage *image, const char *key);
|
|
|
|
CCTexture2D* textureForKey(const char* key);
|
2011-06-14 14:31:25 +08:00
|
|
|
|
2012-08-10 18:14:04 +08:00
|
|
|
CCTexture2D* addPVRImage(const char* filename);
|
|
|
|
|
2012-02-02 14:26:38 +08:00
|
|
|
void removeAllTextures();
|
|
|
|
void removeUnusedTextures();
|
|
|
|
void removeTexture(CCTexture2D* texture);
|
|
|
|
void removeTextureForKey(const char *textureKeyName);
|
|
|
|
void dumpCachedTextureInfo();
|
2011-06-14 14:31:25 +08:00
|
|
|
|
|
|
|
static void reloadAllTextures();
|
2013-07-12 23:58:31 +08:00
|
|
|
|
|
|
|
static CCTextureCache * getInstance();
|
|
|
|
static void destroyInstance();
|
2011-06-14 14:31:25 +08:00
|
|
|
};
|