PollyPocket4eva
03-08-2009, 08:31 AM
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.
Thanks
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.
Thanks