iPhone Development with OpenGL

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

[caption id="attachment_372" align="aligncenter" width="290" caption="OpenGL ES Triangle Demo"]OpenGL ES Triangle Demo[/caption]

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

[caption id="attachment_368" align="aligncenter" width="554" caption="Cocos2D Demo for iPhone"]Cocos2D Demo for iPhone[/caption]

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.

[ad#Link Banner]

Demo: Raytracing on the iPhone

[caption id="attachment_382" align="aligncenter" width="290" caption="Raytracing with Photon Mapping"]Raytracing with Photon Mapping with correct aspect ratio[/caption]

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:

[ad#Large Box]