@valdik wrote:
Hello, I've just upgraded my project from version 3.7 to 3.11.1, and on Android platform most of the sprites became invisible... After some investigation I've found, that the source of the problem was the following check
void Sprite::setSpriteFrame(SpriteFrame *spriteFrame) { ... if (spriteFrame->hasAnchorPoint()) { setAnchorPoint(spriteFrame->getAnchorPoint()); } }
In my case, the check hasAnchorPoint was returning true, when anchor point was actually {NAN,NAN}, so all my sprites had {NAN, NAN} anchors and were not visible. The reason of such behaviour was -ffast-math compiler switch that I was using in my Application.mk file. As I understood, this switch brokes isnan() check from < cmath >.
So if cocos2dx team want to support this optimisation switch, SpriteFrame::hasAnchorPoint() method has to be changed to not use isnan()
Thanks
Posts: 1
Participants: 1