Search code examples
iphonecocos2d-iphoneantialiasing

Disable anti-aliasing by default in cocos2d


I'm making a game in cocos2d that uses "old-school" style graphics, and I don't want the sprites to be antialiased in any way. I can use [[sprite texture] setAliasTexParameters] to disable the antialiasing, but I need to do that for every sprite, and it clutters the code. Is there any way to do it globally by default?


Solution

  • You can edit CCTexture2D code to setAliasTexParameters by default, but that will mean updates to cocos2d will be a headache really fast.
    What I done when I needed this, I wrote a function to create the textures for me and it called setAliasTexParameters on each.