Closed irwinb closed 12 years ago
This is by design actually... the image is downscaled if it's larger than 1024x1024 in order to save memory. Then the downscaled texture is scaled back up to the original proportion.
Oh. Interesting. What are the relevant files that implement this behavior so that I may adjust them so suit my needs :).
Thanks again for your help dustin btw..
Check CCTexture2D, specifically kMaxTextureSize and initWithImage().
Note that on android, the largest texture that you can use is 2048 x 2048. I'm not exactly sure why they set kMaxTextureSize to 1024, but maybe that's just how they process... maybe that's more like kHalfMaxTextureSize instead, lol.
Anyway, just be careful. If you change it to 2048 and it crashes, well, know that it's just too large for Android's limit :)
I ran into this issue before when I was trying to use large textures on AndEngine.
My best advice to you is to downscale large images by hand. That way you can be sure of the quality and it's not just some rush job performed by Cocos2D.
Ok, thanks for the info :)
Is this normal behavior? Whenever I try to load a PNG with the size of 2048x1024 or 2048x2048, it appears blurry when rendered on the screen.
A 1024x1024 or smaller PNG works fine.
I'm loading these PNGs via CCSpriteFrameCache.addSpriteFrames(file.plist) and drawing CCSprites created by calling CCSprite.sprite("frame", true).
I'm pretty sure it's not because of the hardware, i'm testing on an Atrix 4G that has a GL_MAX_TEXTURE_SIZE of 2048..if that even matters.