The purpose of the two global variables is to store the dimensions of the device window (client area). The variables are assigned values in our registered reshape function. The values are used in the display function for setting viewports.