Quantcast
Channel: Cocos Forums - Latest topics
Viewing all articles
Browse latest Browse all 17070

Texture2D AntiAliasing not working correctly?

$
0
0

@cei wrote:

Hi. It's the first time I post on this forum, even though I have been lurking around for some months now, and I would like to start by thanking everyone who is contributing to cocos2d. The work you have done so far is great.
I am using cocos2d-x v3.9 and I was trying to enable antialiasing on a CCSprite. While looking at Texture2D's implementation I noticed that antialiasing should be working by default (the constructor sets _antialiasEnabled(true) at line 437), but it actually isn't. I got it to work by generating a mipmap, then disabling it and the re-enabling it.
Is it normal that I have to use this code to make antialiasing work?

//Generate mipmap
sprite->getTexture()->generateMipmap();
//Disable antialiasing
sprite->getTexture()->setAliasTexParameters();
//Re-enable antialiasing
sprite->getTexture()->setAntiAliasTexParameters();

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 17070

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>