Corrected code to use textDefinition properties
closed #2342: Fixing compilation errors when CC_ENABLE_CACHE_TEXTURE_DATA is enabled.
closed #2342: Fixing indention.
Merge pull request #3032 from dumganhar/iss2342-build-errors

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