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
|
|
|
|
2012-02-02 14:26:38 +08:00
|
|
|
static CCTextureCache * sharedTextureCache();
|
2011-06-14 14:31:25 +08:00
|
|
|
static void reloadAllTextures();
|
2012-02-02 14:26:38 +08:00
|
|
|
static void purgeSharedTextureCache();
|
2011-06-14 14:31:25 +08:00
|
|
|
};
|