Shall I make node invisible when it's out of screen?

Hi,

Does it make any sense to check whether sprite is out of screen and make it invisible if so? Is this done by Cocos2d-x (or OpenGL ES2) automatically or I should check this manually?

I have lots of sprites out of screen, and when I make them invsible, this reduces amount of draw calls, but I’m still not sure if this influence on perfomance really significantly.

Thanks.

I’m of the opinion that you don’t look to optimize unless you notice an issue :).

I’d be surprised if you should have to make them invisible when they are off the screen.

Thanks for reply. I’m worrying about this because I have lots of sprites on the scene while most of them are located outside the screen.

Anyway, I’ve found following suggestment in neighbor discussion about cocos2d-x 3.0 rendering pipeline:

Viewing frustum Geometry culling
Sprites (and geometries more in general) not visible from the camera’s point of view be automatically removed from the current frame and not rendered

Does it mean that nodes which are located outside the screen are still rendered in cocos2d 2.x?

I would say that suggests it would be the case for cocos2d-x 3.0 not 2.0, but again, I really wouldn’t worry unless you are experiencing issues :).