Updated opengl graphics class.