You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/** CCSpriteBatchNode is like a batch node: if it contains children, it will draw them in 1 single OpenGL call
36
+
* (often known as "batch draw").
37
+
*
38
+
* A CCSpriteBatchNode can reference one and only one texture (one image file, one texture atlas).
39
+
* Only the CCSprites that are contained in that texture can be added to the CCSpriteBatchNode.
40
+
* All CCSprites added to a CCSpriteBatchNode are drawn in one OpenGL ES draw call.
41
+
* If the CCSprites are not added to a CCSpriteBatchNode then an OpenGL ES draw call will be needed for each one, which is less efficient.
42
+
*
43
+
*
44
+
* Limitations:
45
+
* - The only object that is accepted as child (or grandchild, grand-grandchild, etc...) is CCSprite or any subclass of CCSprite. eg: particles, labels and layer can't be added to a CCSpriteBatchNode.
46
+
* - Either all its children are Aliased or Antialiased. It can't be a mix. This is because "alias" is a property of the texture, and all the sprites share the same texture.
47
+
*
48
+
* @since v0.7.1
49
+
*/
50
+
classCCX_DLL CCSpriteBatchNode : public CCNode, public CCTextureProtocol
51
+
{
52
+
protected:
53
+
/** returns the TextureAtlas that is used */
54
+
CCTextureAtlas *m_pTextureAtlas;
55
+
/** conforms to CCTextureProtocol protocol */
56
+
ccBlendFunc m_tBlendFunc;
57
+
/** descendants (children, gran children, etc) */
58
+
/// chneyan @todo CCArray *descendants_; what is CCArray
59
+
60
+
public:
61
+
CCSpriteBatchNode();
62
+
virtual~CCSpriteBatchNode();
63
+
/** creates a CCSpriteBatchNode with a texture2d and a default capacity of 29 children.
64
+
The capacity will be increased in 33% in runtime if it run out of space.
0 commit comments