The CGWorld callback functions that are invoked handle display, reshape, mouse, motion and special keyboard events. We normally do not register a reshape function unless we need the device dimensions. We have seen in other examples and tutorials that the dimensions are used in explicitly setting the viewport(s). In this example, we are using the device dimensions in our mouse and mouseMotion callback functions (see the discussion on those handlers).