Search code examples
ioscocos2d-iphoneccspritekobold2d

CCSprite scale - How can I change method of scaling?


I want to scale CCSprite by nearest neighbor method. But just setting sprite.scale causes blurred scaling ( I think it's bilinear or something)

So how can I change the method of scaling? Is that possible?


Solution

  • Try this:

    [sprite.texture setAliasTexParameters];
    

    Keep in mind that this will affect all the sprites that are using the texture.