Cocos2d Sprite 使用位平面的性能
是否可以通过减少图像文件中使用的位平面数量来提高绘制精灵的性能?例如,如果您只使用 4 种颜色,因此图像是 2 个位平面,那么 cocos2d 会比 24 位彩色精灵更快地显示和操作这些颜色吗?
Is it possible to improve performance drawing sprites by reducing the number of bit planes used in their image file? For example if you only used 4 colours and hence image was 2 bitplanes, would cocos2d show and manipulate these quicker than a 24 bit colour sprite?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
减少图像的位深度和大小肯定会提高性能。您将使用更少的纹理内存,总体而言,CPU/内存要做的工作应该更少。最好的办法是尝试减小图像的大小/细节,看看它如何影响性能。
Reducing the bit depth and size for your images will definitely improve performance. You'll be using less texture memory and overall there should be less work for the cpu/memory to do. Best thing to do is try reducing the size/detail of your images and see how it affects performance.