PDA

View Full Version : how can i read an RGBA value off a point on the surface of a polygon?



05-08-2001, 10:40 AM
I thought about using glreadpixels, but it only lets you read a rectangular region in two dimensional space. I need a method that will yield the RGBA value for any point on any surface of any polygon anywhere in 3d space.

I'm stuck. Any help is much appreciated.

-Ixstala

Bob
05-08-2001, 10:48 AM
You can project the point on the polygon to screen coordinates using gluProject. Then use glReadPixels with the coordinates you get from gluProject to get the RGBA-value.

DaViper
05-09-2001, 03:58 AM
do a search in the forum on picking...