Merge pull request #3310 from minggo/develop

set _hasPremultipliedAlpha property correctly when it is a pvr texture
This commit is contained in:
minggo 2013-07-28 09:41:50 -07:00
commit 806bc5c48f
1 changed files with 3 additions and 1 deletions

View File

@ -662,7 +662,9 @@ bool Texture2D::initWithPVRFile(const char* file)
_pixelsWide = pvr->getWidth();
_pixelsHigh = pvr->getHeight();
_contentSize = Size((float)_pixelsWide, (float)_pixelsHigh);
_hasPremultipliedAlpha = (pvr->isForcePremultipliedAlpha()) ? pvr->hasPremultipliedAlpha() : _PVRHaveAlphaPremultiplied;
// FIX ME, if premultiply should be false, or the test case in RenderTextureTest(RenderTextureTargetNode) works in wrong effect
//_hasPremultipliedAlpha = (pvr->isForcePremultipliedAlpha()) ? pvr->hasPremultipliedAlpha() : _PVRHaveAlphaPremultiplied;
_hasPremultipliedAlpha =PVRHaveAlphaPremultiplied_;
_pixelFormat = pvr->getFormat();
_hasMipmaps = pvr->getNumberOfMipmaps() > 1;