Compilation problem when set CC_ENABLE_CACHE_TEXTURE_DATA to 1

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

Hi,

I think this is what happens in 2.1.5 as well, I was getting the same error for my cocos2d-x game when I tried to compile with cocos2dx v2.1.5. I guess the fix is to use the parameters from the ccFontDefinition struct pointer being passed to the function

#if CC_ENABLE_CACHE_TEXTURE_DATA
// cache the texture data
VolatileTexture::addStringTexture(this, text, textDefinition~~>m_dimensions, textDefinition~~>m_alignment, textDefinition~~>m_vertAlignment, textDefinition~~>m_fontName.c_str(), textDefinition->m_fontSize);
>#endif