The point of the example is to allow a user to view a Wavefront model through rotations about the x and/or y coordinate axes. The angles of rotation are stored in the variables updatedAngleX and updatedAngleY. These angles are updated with the user dragging the mouse. Now, we apply the angles with calls to the OpenGL function glRotated, as seen here.

Since the model is initially NULL, we test this case so as to avoid a runtime error with the call
    model->drawModel();
Last, we set lighting in our display function since the user is allowed to change it.