Our first activity is clear the color and depth buffers. Next we draw the checker board. Since the board is designed to be displayed without lighting and withlout a texture map, we disable each of these before making the call drawBoard();

We next draw the cylinder with the call drawCylinder(). Unlike the board, our cylinder is designed to be displayed with lighting and with a texture map if so chosen by the user. Therefore, we test the variables textureChoice and enableLighting where the user choices are stored and take the appropriate actions based on their values.