Tuesday, July 22, 2008

The 1st example on iPhone


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: 

  1. How to initialize OpenGL ES view using UIView 
  2. How to read an image and create OpenGL ES texture. 
  3. 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. 


No comments:

Post a Comment