Although I’ve been working for some time with cocos2d-x, this is my first post (and first major problem).
I’m using cocos2d-1.0.1-x-0.12.0.
Updating cocos2d-x is not an option now.
I’m loading an image from a buffer (filled with data downloaded from a URL) this way:
img->initWithImageData((void*)buffer.memory, (long)buffer.size, CCImage::kFmtPng);
Then creating a texture:
texture = new cocos2d::CCTexture2D(); texture->initWithImage(img);
This works fine on iOS.
However on Android whenever the app goes background and foreground again, the image becomes white (solid white, or transparent white).
This only occurs for that one sprite created with a CCImage from raw data, and not from regular sprites created from resources (with spriteWithSpriteFrameName).