Here’s my second presentation on iPhone Development at RIT for the Computer Science Community (CSC).If you enjoyed it let me know. I decided to look into graphics and OpenGL for the presentation.

Slides: iPhone Development II – Paul Solt

Demo: Triangle Demo: OpenGL ES on iPhone

OpenGL ES Triangle Demo

OpenGL ES Triangle Demo

The first demo is a basic OpenGL ES iPhone project using vertex/color arrays and an orthogonal view. It’s based on the tutorials from Jeff LaMarche This is the starting point for any iPhone OpenGL ES project. It’ll give you a window that you can draw in and manipulate OpenGL state. Use Jeff’s xcode project template to make this process painless and easy to get started. It’s easier than using GLUT!

Demo: Cocos2D for iPhone: Cocos2D iPhone Graphics Demo

Cocos2D Demo for iPhone

Cocos2D Demo for iPhone

A 2D graphics package to aid graphical applications on the iPhone. It provides some really neat animation support along with project templates to make setup a breeze. Cocos2D comes with two separate physics packages that you can incorporate into your game. The demo shows an animation trigger when the user pressed on the screen. Animations can be built from simple actions and combined to create a complex animation. It’s perfect for a platformer.

Demo: Raytracing on the iPhone

Raytracing with Photon Mapping with correct aspect ratio

Raytracing with Photon Mapping

I ported my computer graphics II ray tracer from OpenGL/GLUT to OpenGL ES on the iPhone. The performance is very slow on the iPhone 3G (133-230 seconds), but that’s to be expected with the given hardware. In the simulator it can render a scene in about 15 seconds. This demo shows how the performance of the actual device is vastly different from the iPhone simulator. I’m sure I can rework portions of the ray tracer to be more efficient, but that wasn’t the goal of the quick port.

Resources:

 

One Response to iPhone Development with OpenGL

  1. This is really interesting stuff. Going to have to pay attention to your stuff. Keep up the good work.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">