mirror of https://github.com/axmolengine/axmol.git
Merge pull request #969 from dumganhar/gles20
fixed #1300: Typo: CC_ENABLE_CACHE_TEXTTURE_DATA -> CC_ENABLE_CACHE_TEXTURE_DATA
This commit is contained in:
commit
c8b62d4ec8
|
@ -224,7 +224,7 @@ void CCRenderTexture::end(bool bIsTOCacheTexture)
|
|||
|
||||
director->setProjection(director->getProjection());
|
||||
|
||||
#if CC_ENABLE_CACHE_TEXTTURE_DATA
|
||||
#if CC_ENABLE_CACHE_TEXTURE_DATA
|
||||
if (bIsTOCacheTexture)
|
||||
{
|
||||
CC_SAFE_DELETE(m_pUITextureImage);
|
||||
|
|
|
@ -31,16 +31,16 @@
|
|||
#include "CCPlatformConfig.h"
|
||||
#include "CCPlatformDefine.h"
|
||||
|
||||
/** @def CC_ENABLE_CACHE_TEXTTURE_DATA
|
||||
/** @def CC_ENABLE_CACHE_TEXTURE_DATA
|
||||
Enable it if you want to cache the texture data.
|
||||
Basically,it's only enabled in android
|
||||
|
||||
It's new in cocos2d-x since v0.99.5
|
||||
*/
|
||||
#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID)
|
||||
#define CC_ENABLE_CACHE_TEXTTURE_DATA 1
|
||||
#define CC_ENABLE_CACHE_TEXTURE_DATA 1
|
||||
#else
|
||||
#define CC_ENABLE_CACHE_TEXTTURE_DATA 0
|
||||
#define CC_ENABLE_CACHE_TEXTURE_DATA 0
|
||||
#endif
|
||||
|
||||
#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) || (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32)
|
||||
|
|
|
@ -45,7 +45,7 @@ THE SOFTWARE.
|
|||
#include "ccGLStateCache.h"
|
||||
#include "CCShaderCache.h"
|
||||
|
||||
#if CC_ENABLE_CACHE_TEXTTURE_DATA
|
||||
#if CC_ENABLE_CACHE_TEXTURE_DATA
|
||||
#include "CCTextureCache.h"
|
||||
#endif
|
||||
|
||||
|
@ -78,7 +78,7 @@ CCTexture2D::CCTexture2D()
|
|||
|
||||
CCTexture2D::~CCTexture2D()
|
||||
{
|
||||
#if CC_ENABLE_CACHE_TEXTTURE_DATA
|
||||
#if CC_ENABLE_CACHE_TEXTURE_DATA
|
||||
VolatileTexture::removeTexture(this);
|
||||
#endif
|
||||
|
||||
|
@ -417,7 +417,7 @@ bool CCTexture2D::initWithString(const char *text, const char *fontName, float f
|
|||
}
|
||||
bool CCTexture2D::initWithString(const char *text, const CCSize& dimensions, CCTextAlignment alignment, const char *fontName, float fontSize)
|
||||
{
|
||||
#if CC_ENABLE_CACHE_TEXTTURE_DATA
|
||||
#if CC_ENABLE_CACHE_TEXTURE_DATA
|
||||
// cache the texture data
|
||||
VolatileTexture::addStringTexture(this, text, dimensions, alignment, fontName, fontSize);
|
||||
#endif
|
||||
|
|
|
@ -361,7 +361,7 @@ void CCTextureCache::addImageAsyncCallBack(ccTime dt)
|
|||
texture->initWithImage(pImage);
|
||||
#endif
|
||||
|
||||
#if CC_ENABLE_CACHE_TEXTTURE_DATA
|
||||
#if CC_ENABLE_CACHE_TEXTURE_DATA
|
||||
// cache the texture file name
|
||||
VolatileTexture::addImageTexture(texture, filename, pImageInfo->imageType);
|
||||
#endif
|
||||
|
@ -449,7 +449,7 @@ CCTexture2D * CCTextureCache::addImage(const char * path)
|
|||
|
||||
if( texture )
|
||||
{
|
||||
#if CC_ENABLE_CACHE_TEXTTURE_DATA
|
||||
#if CC_ENABLE_CACHE_TEXTURE_DATA
|
||||
// cache the texture file name
|
||||
VolatileTexture::addImageTexture(texture, fullpath.c_str(), eImageFormat);
|
||||
#endif
|
||||
|
@ -527,7 +527,7 @@ CCTexture2D * CCTextureCache::addPVRImage(const char* path)
|
|||
tex = new CCTexture2D();
|
||||
if(tex != NULL && tex->initWithPVRFile(fullpath.c_str()) )
|
||||
{
|
||||
#if CC_ENABLE_CACHE_TEXTTURE_DATA
|
||||
#if CC_ENABLE_CACHE_TEXTURE_DATA
|
||||
// cache the texture file name
|
||||
VolatileTexture::addImageTexture(tex, fullpath.c_str(), CCImage::kFmtRawData);
|
||||
#endif
|
||||
|
@ -582,7 +582,7 @@ CCTexture2D* CCTextureCache::addUIImage(CCImage *image, const char *key)
|
|||
|
||||
} while (0);
|
||||
|
||||
#if CC_ENABLE_CACHE_TEXTTURE_DATA
|
||||
#if CC_ENABLE_CACHE_TEXTURE_DATA
|
||||
VolatileTexture::addCCImage(texture, image);
|
||||
#endif
|
||||
|
||||
|
@ -667,7 +667,7 @@ CCTexture2D* CCTextureCache::textureForKey(const char* key)
|
|||
|
||||
void CCTextureCache::reloadAllTextures()
|
||||
{
|
||||
#if CC_ENABLE_CACHE_TEXTTURE_DATA
|
||||
#if CC_ENABLE_CACHE_TEXTURE_DATA
|
||||
VolatileTexture::reloadAllTextures();
|
||||
#endif
|
||||
}
|
||||
|
@ -699,7 +699,7 @@ void CCTextureCache::dumpCachedTextureInfo()
|
|||
CCLOG("cocos2d: CCTextureCache dumpDebugInfo: %ld textures, for %lu KB (%.2f MB)", (long)count, (long)totalBytes / 1024, totalBytes / (1024.0f*1024.0f));
|
||||
}
|
||||
|
||||
#if CC_ENABLE_CACHE_TEXTTURE_DATA
|
||||
#if CC_ENABLE_CACHE_TEXTURE_DATA
|
||||
|
||||
std::list<VolatileTexture*> VolatileTexture::textures;
|
||||
bool VolatileTexture::isReloading = false;
|
||||
|
@ -897,7 +897,7 @@ void VolatileTexture::reloadAllTextures()
|
|||
isReloading = false;
|
||||
}
|
||||
|
||||
#endif // CC_ENABLE_CACHE_TEXTTURE_DATA
|
||||
#endif // CC_ENABLE_CACHE_TEXTURE_DATA
|
||||
|
||||
NS_CC_END
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ THE SOFTWARE.
|
|||
#include "CCTexture2D.h"
|
||||
|
||||
|
||||
#if CC_ENABLE_CACHE_TEXTTURE_DATA
|
||||
#if CC_ENABLE_CACHE_TEXTURE_DATA
|
||||
#include "CCImage.h"
|
||||
#include <list>
|
||||
#endif
|
||||
|
@ -163,12 +163,12 @@ public:
|
|||
CCTexture2D* addPVRImage(const char* filename);
|
||||
|
||||
/** Reload all textures
|
||||
It's only useful when the value of CC_ENABLE_CACHE_TEXTTURE_DATA is 1
|
||||
It's only useful when the value of CC_ENABLE_CACHE_TEXTURE_DATA is 1
|
||||
*/
|
||||
static void reloadAllTextures();
|
||||
};
|
||||
|
||||
#if CC_ENABLE_CACHE_TEXTTURE_DATA
|
||||
#if CC_ENABLE_CACHE_TEXTURE_DATA
|
||||
|
||||
class VolatileTexture
|
||||
{
|
||||
|
|
|
@ -195,7 +195,7 @@ void RenderTextureTest::ccTouchesMoved(CCSet* touches, CCEvent* event)
|
|||
|
||||
void RenderTextureTest::ccTouchesEnded(CCSet* touches, CCEvent* event)
|
||||
{
|
||||
#if CC_ENABLE_CACHE_TEXTTURE_DATA
|
||||
#if CC_ENABLE_CACHE_TEXTURE_DATA
|
||||
|
||||
CCSetIterator it;
|
||||
CCTouch* touch;
|
||||
|
|
Loading…
Reference in New Issue