On the main idevgames website you should be able to download an app called GLCubes that uses OpenGL in cocoa and uses a set time delay so you dont have to do all that integration stuff to make animations work on different render speeds.
GLCubes.