PDA

View Full Version : RGB values



JFP
04-26-2005, 03:51 AM
How can i get the RGB values at the vertex in the corners of a triangle?

RigidBody
04-26-2005, 04:21 AM
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.