retrieving pixel coordinates

i need to know the coordinates of pixels on a line drawn using GL_LINE. does anyone know if there is a function that recovers them???

I’ll assume you are refering to a line segment.
What you might try is projecting the end points
of your line using gluProject(…), then using the equation of a line to get the positions in between. Of course, this won’t give you exact fragment centers, but it will allow you to quantize the interval however you see fit…