We are migrating issue tracker of Cocos2d-x Project to Github, please create new issue there. Thanks.
Add an API Texture2D* TextureCache::addImage(Image *image, cons char * key)
Add an API Texture2D* TextureCache::addImage(Image *image, cons char * key)
I am sorry, I mean to add an API like :
Texture2D * TextureCache::addImage(const std::string &path, const std::string &key);
Texture2D * TextureCache::addImage(const std::string &path)
Currently, the implementation is to convert the path to the real path, and put the real path as the key to store image into map.
_textures.insert( std::make_pair(fullpath, texture) );
When I use TextureCache::getInstance()->getTextureForKey to get the image, I have to input the real path of the image as the key to query it. Complicated and unreasonable a bit.
Regards,
Sean
Redmine issue system is closed, we are using github issue system instead.
This issue was moved to https://github.com/cocos2d/cocos2d-x/issues/8273
Status: | Closed | |
---|---|---|
Start date: | 2013-11-30 | |
Priority: | Low | |
Due date: | ||
Assignee: | - | |
% Done: | 0% |
|
Category: | all | |
Target version: | - |
I am using TextureCache::addImage, why not add an API
Texture2D* TextureCache::addImage(Image image, cons charkey) ?