Can't use High Res atlas textures

Can't use High Res atlas textures
0.0 0



I’m using version 0.8.2 and I want to enable Retina Display in my application.
I have both {texture_name.plist,texture_name.png} and {texture_name-hd.plist,texture_name-hd.png} in my resource folder.

I see that it always uses the low res texture_name.png file. The plist file is loaded correctly ( the text_name-hd.plist ).

I am wondering if this method is correct:

CCTexture2D * CCTextureCache::addImage(const char * path)
    CCAssert(path != NULL, "TextureCache: fileimage MUST not be NULL");

    CTexture2D * texture = NULL;
    // Split up directory and filename
    // MUTEX:
    // Needed since addImageAsync calls this method from a different thread


    // remove possible -HD suffix to prevent caching the same image twice (issue #1040)
    std::string pathKey = path;

    pathKey = CCFileUtils::fullPathFromRelativePath(pathKey.c_str());
    texture = m_pTextures->objectForKey(pathKey);

    std::string fullpath = pathKey; // (CCFileUtils::fullPathFromRelativePath(path)); 

As far as I understand the low res ( without -hd) image is loaded each time.

Can you please advice ?

Thank you!


I fixed it.
It wasn’t a bug, I did a clean and build and now it’s working :stuck_out_tongue: