mirror of https://github.com/axmolengine/axmol.git
6bbf01537d
* Allow to unbind asynchronous texture loading callback with a custom key. In order to unbind the callback passed to `cocos2d::TextureCache::addImageAsync(path, callback)`, one has to call `cocos2d::TextureCache::unbindImageAsync(path)`. In the cases where the loading of the same texture is requested from several sources simultaneously, then none of the source can unbind its own callback unambiguously. This commit adds an overload of the `addImageAsync` function taking an extra argument identifying the callback, thus allowing to unbind it unambiguously in cases where the loading of path is requested by several sources simultaneously. * Add a test case for TextureCache::addImageAsync with a custom key. |
||
---|---|---|
.. | ||
TextureCacheTest.cpp | ||
TextureCacheTest.h |