Have you checked out the same openGL app? It does all of this. You can create the sample app like this:
1) Open XCode
2) Go to the 'File' menu and select 'New Project'
3) On the left side pick iPhone OS and Application, on the right side pick OpenGL ES application.
This will create a new project with a sample OpenGL application. You can use this as the starting point for any openGL ES based app.
-Keith
|