http://content.gpwiki.org/index.php/OpenGL:Tutorials:Picking
I'm asking this, because I used it in my project and I have a problem.
My cube in the scene has ID 1:

The red square on top of the cube was made by me in photoshop. It is to show the area where I click and returns the selected cube.
That is, the edges of the cube is shown by the function list_hits not selected anything, but I clicked on the edge of the cube!

Find content
Not Telling