initial codes for OpenGL on osx