Where to start openGL ES to create and rotate a cu

2019-01-06 22:16发布

问题:

I've done some apps on iPhone using Objevtive-C and Cocos2d, and I'd like to start learning 3D.
My first goal is to make a very simple app that:
- Displays a 3D cube in the center of the screen.
- And move the camera around the cube
I want something very simple: no texture, no background.

Where should I start to be able to do this app? I'm searching for some tutorials or exemples.
Thanks!

回答1:

I created an OpenGL ES sample application that displays a textured cube, and lets you rotate it using touch gestures, as part of the class I teach on iPhone development. I warn you, though, I didn't quite get the faces right in that example, so it's up to you to correct my mistakes. The notes from that course, including the lecture on OpenGL ES, are available in VoodooPad format here.

For a more complex example, you can download the source code to my iPhone / iPad application Molecules.