In the Cocos3D distribution, have a look at the CC3DemoMultiScene
demo app. It is an example of using Cocos3D within a larger view and controller using Storyboards. The AppDelegate
and MainViewController
are what you want to look at, as well as the Main-iPad
storyboard.
Specifically, the MainViewController
open3DControllerWithShadows:
and makeCC3ControllerWithShadows:
methods will point you in the right direction.
MainViewController
is more complex than you need, because it actually allows the user to completely shut down OpenGL ES, and swap out different scenes. You won't need that, and even if you do want to swap out scenes, do not use the technique here, because you certainly do not need to shut down OpenGL ES in between scene changes. It's included in this demo to prove that you can shut down OpenGL ES if you need to, not as an example of scene changing in general.