Ray/Object Determination

Does OpenGL have a function which allows you to query what object appears at a certain location in screen-coordinates?
Naturally, any ray tracer would inherently know which object in a scene was “first hit” by a particular ray.
It could of course be custom written, but I’m wondering if there is anything built into OpenGL…
Ideally a function that would take a (x, y) screen coord and return the (name?) or address of the first visible object at that coord.

gluUnproject will return a 3d point from a window coordinate point. the 3d point returned is in the object coordinate and u can here verify if it hits ur object or no .

to finish .just as an idea u can construct a bounding area ( bounding box or sphere) for ur object and than u can verify if the 3d point returned from gluUnproject is in the bounding area or no .