Once the selected object has been identified, an application will typically modify the appearance of the object to indicate that it has been selected. A simple way to accomplish this is to redraw the entire scene, drawing the selected object with a different appearance (wireframe, different color, etc).
In applications manipulating complex models, the cost of redrawing the entire scene to indicate a selection may be prohibitive. This is particularly true for applications which implement locate-highlight in which each object is highlighted as the cursor passes over or near it to indicate that this is the candidate object for manipulation by the application. An extension of this problem exists for painting applications that need to track the location of a brush over an object and make changes to the appearance of the object based on the current painting parameters .
An alternative to redrawing the entire scene is to use overlay color buffers to draw highlights on top of the existing scene. One difficulty with this strategy is that it may be difficult to modify only the visible surfaces of the selected object since the depth information is present in the depth buffer associated with the main color buffer. For applications in which the visible surface information is not required, overlay buffers are an efficient solution. If visible surface information is important, then it may be better to modify the color buffer directly. A selected object that has been depth buffered can be overdrawn directly by changing the depth test function to GL_ LEQUAL and redrawing the object geometry with different attributes.