New issue
 Projects > cocos2d-x > Issues > Feature #2490

"grid" rendering node

Feature #2490 [New]
cmorgantini 2013-08-06 20:26 . Updated over 11 years ago

Right now, even when using a batch node, actual Sprite objects need to be created and added to the batch node.
This is definitely not ideal in cases where we want to create/use lots of mainly static sprites (i.e. Text/Labels).
Currently, in these scenarios(lots of static batched sprites), we still pay the memory/performance costs involved with creating sprites and adding them the the scene graph, even if it’s not really needed (99% of the cases).
We would like to create a new node/system for better handling cases like this one (lot of sprites mostly static).
This system should allow to crate and render a “grid” of batched quads without to having to go through the creation and “handling” of actual sprites.

ricardo 2013-08-06 22:37

carlo Morgantini wrote:

Right now, even when using a batch node, actual Sprite objects need to be created and added to the batch node.
This is definitely not ideal in cases where we want to create/use lots of mainly static sprites (i.e. Text/Labels).
Currently, in these scenarios(lots of static batched sprites), we still pay the memory/performance costs involved with creating sprites and adding them the the scene graph, even if it’s not really needed (99% of the cases).
We would like to create a new node/system for better handling cases like this one (lot of sprites mostly static).
This system should allow to crate and render a “grid” of batched quads without to having to go through the creation and “handling” of actual sprites.

BatchNode currently supports that.

It has 3 APIs for that:

void insertQuadFromSprite(Sprite *sprite, int index);
void updateQuadFromSprite(Sprite *sprite, int index);
SpriteBatchNode * addSpriteWithoutQuad(Sprite*child, int z, int aTag);

Atom PDF

Status:New
Start date:2013-08-06
Priority:High
Due date:
Assignee:-
% Done:

0%

Category:all
Target version:-