Apple provides some sample codes to show how to use OpenGL ES on iPhone. I tried the first one, 'GLSprite' on the iPhone simulator. The sample code shows:
- How to initialize OpenGL ES view using UIView
- How to read an image and create OpenGL ES texture.
- How to render the scene.
I changed the image and tried some OpenGL ES functions. The screenshot is on the right.
Most of the sample codes is understandable, but, there is one thing I couldn't. The example code seems to use a framebuffer for rendering OpenGL scene, but I'm not sure this is the right way of using OpenGL ES on iPhone... Or, is there any reason to do in this way ?
Well, it may be clearer after I learn how Objective-C framework works on iPhone.