CCSpriteBatchNode使用限制
2014-08-22 11:47
281 查看
CCSpriteBatchNode islike a batch node: if it contains children, it will draw them in 1single OpenGL call (often known as "batch draw").
A CCSpriteBatchNode canreference one and only one texture (one image file, one textureatlas). Only the CCSprites that are contained in
that texture canbe added to the CCSpriteBatchNode.All CCSprites added to a CCSpriteBatchNode aredrawn
in one OpenGL ES draw call. If the CCSprites are not added toa CCSpriteBatchNode thenan OpenGL ES draw call will be needed for each one,
which is lessefficient.
Limitations:
The onlyobject that is accepted as child (or grandchild, grand-grandchild,etc...) is CCSprite or
anysubclass of CCSprite. eg: particles, labelsand layer can't be added to a CCSpriteBatchNode.
Either all its children areAliased or Antialiased. It can't be a mix. This is because "alias"is a property of the texture, and all the sprites share the sametexture.
A CCSpriteBatchNode canreference one and only one texture (one image file, one textureatlas). Only the CCSprites that are contained in
that texture canbe added to the CCSpriteBatchNode.All CCSprites added to a CCSpriteBatchNode aredrawn
in one OpenGL ES draw call. If the CCSprites are not added toa CCSpriteBatchNode thenan OpenGL ES draw call will be needed for each one,
which is lessefficient.
Limitations:
The onlyobject that is accepted as child (or grandchild, grand-grandchild,etc...) is CCSprite or
anysubclass of CCSprite. eg: particles, labelsand layer can't be added to a CCSpriteBatchNode.
Either all its children areAliased or Antialiased. It can't be a mix. This is because "alias"is a property of the texture, and all the sprites share the sametexture.
相关文章推荐
- iphone游戏开发之cocos2d( 十一 )使用CCSpriteBatchNode和纹理图册,提高精灵动画效率;
- cocos2d: 使用TexturePacker , pvr.ccz, CCSpriteBatchNode, CCSpriteFrameCache
- CCSpriteBatchNode的特点和使用方法
- cocos2dx2.x使用CCSpriteBatchNode不显示
- cocos2dx打飞机项目笔记五:CCSpriteBatchNode 的使用
- CCSpriteBatchNode的作用,使用
- 使用CCSpriteBatchNode实现动画效果
- CCSpriteBatchNode的使用
- 【爱上cocos2d-x之八】使用CCSpriteBatchNode优化绘制一批相同的精灵
- [Cocos2d-x]CCSpriteBatchNode的使用
- CCSpriteBatchNode 的使用
- 使用CCSpriteBatchNode实现动画效果
- Cocos2d-x 利用CCSpriteBatchNode建立子弹池
- 【iOS-Cocos2d游戏开发之九】讲解CCSpriteBatchNode与TP工具的".pvr.ccz",".plist"共用的终极精灵优化及注意事项!
- 【iOS-Cocos2d游戏开发之九】讲解CCSpriteBatchNode与TP工具的”.pvr.ccz”,”.plist”共用的终极精灵优化及注意事项!
- Cocos2d-x 利用CCSpriteBatchNode提高渲染效率
- Cocos2d-x 利用CCSpriteBatchNode提高渲染效率
- Cocos2d-x利用CCSpriteBatchNode提高渲染效率
- cocos2d-x之 CCSpriteBatchNode 用法总结
- 【iOS-Cocos2d游戏开发之九】讲解CCSpriteBatchNode与TP工具的".pvr.ccz",".plist"共用的终极精灵优化及注意事项!