Completed port into modern OpenGL.