closed #2342: Fixing compilation errors when CC_ENABLE_CACHE_TEXTURE_DATA is enabled.