Window coordinates and polygon position

Hello, I’m quite new in the OpenGL world so this question could be stupid… :o I’ve been searching the anwser in manuals and forums but I didn’t find it.

My objetive is select a GL_TRIANGLE drawn on the screen with the mouse. Because when I click I just get 2 coordinates (x,y) and the triangle is draw by vectors I don’t know how to ask if the position (x,y) that I’ve clicked belongs to the triangle zone, also I change the zoom with the glPerspective and the triangle’s size changes, but its atributes are the same, so I don’t know how to manage all this parameters.

There is any solution or an openGL method to ask where are the actual coordinates of a concrete polygone?

Thanks! :smiley: