January 10th, 2012 by Eric Berna
Modern 3D graphics APIs such as recent versions of OpenGL use a programmable rendering pipeline. Unfortunately I know more about the older fixed-function rendering pipeline. I took a course in college on 3D graphics programming that taught lots of theory and an older version of OpenGL. I’ve produced programs that portably run in GLUT on both Macs and Windows. I’ve written an iOS app that uses OpenGL ES 1. Yet I was slow to make the jump to the programmable pipeline versions of OpenGL.
I recently came across Jason L. McKesson’s Learning Modern 3D Graphics Programming. After a quick perusal I concluded the book could be a refresher for 3D graphics programming while moving me up to the programmable pipeline. I started reading the book, downloaded the source code, and tried to get it running on my Mac.
I didn’t have much luck. The framework McKesson wrote to isolate his example code from the overhead of displaying a window on screen and interfacing with the operating system seems to be written for Windows first, then ported to Unix like systems (Linux, etc.). It doesn’t “just work” in Xcode on my Mac. After spending some effort at building Xcode projects that could build McKesson’s framework I abandoned the effort.
I’m an iOS developer. I want to write OpenGL ES 2 code in iOS apps. Apple’s GLKit in the iOS 5 API serves the same function as McKesson’s framework. I realized any effort put into getting McKesson’s framework to build in Xcode on my Mac would not actually serve my final purpose. Instead I should just use the source code of McKesson’s tutorial programs as guidelines for building iOS apps. For each of McKesson’s example programs I’ll write the equivalent GLKit iOS program.
I’ve also decided to share my efforts. This blog post is merely an announcement of my project. As I make my way through the tutorials in this book I’ll write up a description of how my programs differ from the originals. My blog posts will build on McKesson’s book, covering merely the differences between his example programs and my iOS versions. As I write these posts I’ll assume the reader has some knowledge of iOS programming.
Read the book and follow along.