A template for building OpenGL-based applications on OS X