CCSprite 的边框周围有奇怪的白色像素
我的 iPhone 游戏在 cocos2d 中遇到了一个奇怪的问题。我创建了一个 PNG 文件,如下
在 cocos2d 中,我使用 CCSpriteSheet 来获取每个球的所有与 PNG 文件。在那之前它运作良好。
然而,奇怪的是,在 iPhone 的屏幕上,球的边框周围有奇怪的白色像素,如下图所示
我在网上做了很多研究。但是像使用TexturePacker或重置glBlendFunc这样的每一个建议都不起作用:(
你有什么想法吗?
更新:我尝试使用普通的CCSprite和只有一个球的单独的PNG文件,问题仍然存在!我想我必须配置 cocos2d 源代码一些如何让它工作。
I'm facing a weird problem in cocos2d for my iPhone game. I have created a PNG file as below
In cocos2d, I use CCSpriteSheet to get each ball all of the with PNG file. It works well until then.
However, the weird thing is that on the iPhone's screen, the ball has weird white pixels around the border, as shown in the below screenshot
I have done so many researches on the web. But every suggestion like using TexturePacker or reset the glBlendFunc didn't work :(
Do you have any idea?
Update: I try to used normal CCSprite with separate PNG file of only one ball, the problem is still! I guess that I have to configure the cocos2d sourcecode some how to get it worked.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我已经弄清楚了这个问题。不是因为图形本身。这是因为 box2d 在 CCSprite 背面为 b2Fixture 创建了轮廓。我在这里发布了针对该特定问题的问题!
http://www.cocos2d-iphone.org/forum /topic/25368?replies=1#post-132008
I have figured out the issue. Not because of the graphic itself. It's because of the box2d create an outline for the b2Fixture on the back of the CCSprite. Here I posted a question for that specific question!
http://www.cocos2d-iphone.org/forum/topic/25368?replies=1#post-132008