iOS Framework Abstractions
I recently had the chance to throw together a small/simple iOS application using some of the newer frameworks I hadn’t used before. Specifically, the gesture recognizer and GLKit frameworks.
I created a simple 3D Cube using GLKit and added gesture support, texturing, lighting, and dynamically changeable textures, just to get a feel for the API. The GLKit API is good, and the gesture recognizer API is great. I trivially added drag, single tap, double tap, pinch, and rotate gestures that all manipulate the cube in some way. Lighting normals and texture coordinates were a couple of the trickier bits, but they were done in a manner that’s fairly identical to normal OpenGL ES, so it just required a bit of thought to connect the dots.
The act of getting the application running with GLKit compared to vanilla OpenGL ES (1.1 or 2.0) was definitely a step up, and GLKit is a great abstraction. The only thing lacking is better documentation and examples utilizing it, but that will come with time. I definitely intend to make use of GLKit for any future iOS OpenGL based applications, but this simple little excursion is available on GitHub.