views:

242

answers:

1

I'm trying to scale a sprite, but have the texture be scaled in a "pixelly" way, like retro games.

I know how to do this in OpenGL, but I'm not sure how to do this in Cocos2d.

How do I do this? Is there a way of getting at the OpenGL? Or something through Cocos2d?

Thanks,

uaq

+2  A: 

With Cocos2d 0.8 (latest) it is very easy...

You just call setAliasTexParameters on your texture...

for example:

Sprite *aSprite = [Sprite spriteWithFile:@"someTextureImage.png"];

[aSprite.texture setAliasTexParameters];

CJ Hanson