I try to set the value of CC_ENABLE_CACHE_TEXTURE_DATA to 1 in the file CCPlatformMacros.h to run my app on android.
In cocos2d-x 2.1.4 only Emscripten has CC_ENABLE_CACHE_TEXTURE_DATA set to 1.
I modify the following code:
#if (CC_TARGET_PLATFORM == CC_PLATFORM_EMSCRIPTEN)
#define CC_ENABLE_CACHE_TEXTURE_DATA 1
#else
#define CC_ENABLE_CACHE_TEXTURE_DATA 0
#endif
to
#if (CC_TARGET_PLATFORM == CC_PLATFORM_EMSCRIPTEN || CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID)
#define CC_ENABLE_CACHE_TEXTURE_DATA 1
#else
#define CC_ENABLE_CACHE_TEXTURE_DATA 0
#endif
But when I set the value to 1 to android platform, I receive an error in the follwoing line of the CCTexture2D.cpp
VolatileTexture::addStringTexture(this, text, dimensions, hAlignment, vAlignment, fontName, fontSize);
There’s any way to enable the CC_ENABLE_CACHE_TEXTURE_DATA on android platform