Implemented OpenGL initialization and running on OSX.