一、现在要处理的问题
如果增加多个相同精灵(超多),难道要一个一个渲染??有没有更效率的方法呢??
答案是有的,使用批处理渲染。使用CCSpriteBatchNode即可实现这个效果。
二、CCSpriteBathNode文档
大概理解下
/** CCSpriteBatchNode is like a batch node: if it contains children, it will draw them in 1 single OpenGL call
* (often known as "batch draw").
* //CCSPriteBathNode像是一个批处理节点,他将只会调用一个OpenGL渲染它包含的子节点(CCSprite) 因此,CCSpriteBatchNode也被称为批处理渲染。
* A CCSpriteBatchNode can reference one and only one texture (one image file, one texture atlas).
//一个CCSpriteBatchNode 只能引用一个且只有一个纹理(图像文件,图像别名)
* Only the CCSprites that are contained in that texture can be added to the CCSpriteBatchNode.
//只有CCSprite所包含在纹理才能增加到对应的批处理渲染节点上(CCSp