RGB values

How can i get the RGB values at the vertex in the corners of a triangle?

actually it should be the color you defined with glColor3f(…)- unless you enable lighting, for example.

to get the displayed color, you should

  1. use gluProject(…) to get the vertex position on the screen.

  2. use glReadPixels(…) to read the color buffer at this position.