Removed use of functions and constants deprecated in OpenGL 3.0 and removed in OpenGL 3.1.