Developers Manual > Cocos2d-x > Modules > Scene Graph > Director

Director

The CCDirector is a shared (singleton) object that takes care of navigating between scenes. It knows which scene is currently active and allows you to change scenes by replacing the current scene or pushing a new one onto the scene stack. When you push a new scene onto the stack, the CCDirector pauses the previous scene but keeps it in memory. Later, when you pop the top scene from the stack, the paused scene resumes from its last state.



The CCDirector is also responsible for initializing OpenGL ES.

scenes650x144.png (37.9 kB) iven, 2013-01-15 02:39

layers.png (65 kB) iven, 2013-01-15 02:39

multi-layers.png (59.9 kB) iven, 2013-01-22 06:03

Sign up for our newsletter to keep up with the latest developments, releases and updates for Cocos2d-x.