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.
Demo: Triangle Demo: OpenGL ES on iPhone
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
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
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.
- OpenGL: "The Red Book" OpenGL(R) Programming Guide: The Official Guide to Learning OpenGL(R), Version 2.1 (6th Edition)
- OpenGL ES Tutorials: http://iphonedevelopment.blogspot.com/2009/05/opengl-es-from-ground-up-table-of.html
- Cocos2D: http://code.google.com/p/cocos2d-iphone/