   Clicking an object with the mouse.
  In my program i want to be able to make an object (like a plane made with a GL_QUAD) clickable. So if i have a plane displayed on the screen i want to be able to click on a point on the screen and get the X, Y position on the plane (not the screen). Is this some sort of collision detection or something?[Edited by - gpr1me on March 26, 2006 4:00:31 PM]
  OpenGL actually has a limited set of mouse picking capabilities (which NeHe has a tutorial on here), however it works by allowing selection of screen-space regions rather than points, so you get a list of selected objects and you chose the closest one to get the effectively selected object.  But if you want the exact world-space intersection point of the selection with the object, you'll have to manually intersect a ray with the object.  Intersecting rays with polygons isn't too bad though, and if you do it in NDC-space then the math can simplify immensely.  Once you have the location in NDC-space, then you can inverse transform it into world-space.I believe there are few references in this FAQ on ray-poly intersection as well as performing the inverse transformations.   