Removed glShadeModel call because it is not part of the OpenGL 3.1+ specifications.