PDA

View Full Version : texture question



hayden
01-18-2013, 04:15 PM
I have mapped texture on a 2D polygon. Is it possible to get the RGB values of a particular point in the polygon.

tonyo_au
01-18-2013, 05:34 PM
Only by reading from the frame buffer. There are several ways of doing this one is to use glReadPixels

hayden
01-21-2013, 09:39 PM
I find difficulty in using glReadPixels. Could you give some sample code?

tonyo_au
01-22-2013, 05:15 AM
try
http://ogldev.atspace.co.uk/www/tutorial29/tutorial29.html

This site has a lot of good tutorials