The Selection subwindow we establish in the main window is for holding the user controls created with the GLUI library. The calls that create the subwindow and register its display function are very similar to those used for the graphics world, CGWorld. Thus, look at the discussion of these for CGWorld.

The background (clear) color, which we pass to Selection's init method, is the same as for the main window. The color used in creating the controls are established by the GLUI library. However, when we set the dimensions of the subwindow, we may have allocated more area than what is needed. Thus, we use the main window's color for any excess area in the subwindow.