Use OpenGL 3 and adapt for OS X usage