What are good reasons to enable 2D projection with cocos2d-iphone?

人盡茶涼 提交于 2019-12-01 06:12:33

Switching to 2D projection is a life saver in the following scenario:

  1. You create a big CCRenderTexture

  2. You draw a bunch of stuff on it, either using [... visit] or OpenGL drawing functions

  3. You add the render texture to your layer, e.g., in order for the things you drew in point 2. to serve as the background for your game.

With 3D projection, the texture will be rendered with vertical and/or horizontal fault lines. See e.g., http://www.cocos2d-x.org/boards/6/topics/16197 which is for cocos2d-x but I have observed the same effect also for cocos2d-iphone and setting the projection to 2D got rid of the problem.

I have switched to 2D projection as the only means to resolve font rendering issues with CClabels, both font file and TTF-based labels. This is not always the cause of a font issue, but it has resolved some problems for me when all else failed.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!