From ba4a48ec7a39e74a4593841ed5b111c26afa16ca Mon Sep 17 00:00:00 2001 From: carlo morgantini Date: Wed, 31 Jul 2013 13:59:08 -0700 Subject: [PATCH] CCTexture2D interface changed --- cocos2dx/label_nodes/CCTextImage.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cocos2dx/label_nodes/CCTextImage.cpp b/cocos2dx/label_nodes/CCTextImage.cpp index e73a41ffc6..e39a28ef71 100644 --- a/cocos2dx/label_nodes/CCTextImage.cpp +++ b/cocos2dx/label_nodes/CCTextImage.cpp @@ -88,7 +88,8 @@ bool TextPageDef::generatePageTexture(bool releasePageData) if (!_pageTexture) return false; - bool textureCreated = _pageTexture->initWithData(_pageData, kCCTexture2DPixelFormat_Default, _width, _height, imageSize); + int dataLenght = (_width * _height * 4); + bool textureCreated = _pageTexture->initWithData(_pageData, dataLenght, Texture2D::PixelFormat::RGBA8888, _width, _height, imageSize); // _pageTexture->setPremultipliedAlpha(true);