OpenGL uses the name stack to differentiate between the different objects in the scene. Hits are discovered on a per-vertex basis, OpenGL doesn't know that the next 8 vertices you draw are part of a cube. GL uses the unsigned integer at the top of the Name stack as the name of the current object. So for each new object we start drawing, we push a new name on the stack. THE NAMES HAVE TO BE UNIQUE OR WE WON'T BE ABLE TO TELL WHAT WAS HIT LATER ON! (that's important...trust me)