I have the following code snip:
auto texture = TextureCache::getInstance()->addImage( “level1.png” );
auto texture2 = TextureCache::getInstance()->getTextureForKey( “level1.png” );
CCAssert( texture2 == texture, “How does this work?” );
The assertion fails.
How do I use the texture cache. The documentation says it uses the filename as key, which I assumed to mean the string I passed in as the filename. Perhaps it uses some other string (fully qualified filename perhaps?). Or is the following code supposed to pass the assertion?