Not every OpenGL implementation supports the same range of frame buffer capabilities, though minimum requirements for frame buffer capabilities do exist. Keep in mind that when a window is damaged, you should assume all of the ancillary buffers are damaged and redraw them all. While many OpenGL implementations will automatically flush pending commands, this is specifically not mandated. Use the menu status callback to know when to avoid menu manipulation. It is more efficient to use glutHideOverlay and glutShowOverlay to control the display state of a window's overlay instead of removing and re-establishing an overlay every time an overlay is needed.
Few workstations have support for multiple simultaneously installed overlay colormaps.
For this reason, if an overlay is cleared or otherwise not be used, it is best to hide it using glutHideOverlay to avoid other windows with active overlays from being displayed with the wrong colormap. If your application uses multiple overlays, use glutCopyColormap to promote colormap sharing. GLUT has no special routine for exiting the program. GLUT programs should use ANSI C's exit routine. GLUT will exit the program unilaterally when fatal errors occur or when the window system requests the program to terminate.