View Full Version : How can I compare the RGB value in pixel?

10-25-2005, 05:43 AM
AfterI use gluScaleImage(GL_RGB,...GL_UNSIGNED_BYTE,...,pdata ) to transfer the pixel address into pdata,how can I compare the RGB value in two different pixel?directly using *pdata or something else?But when I attemp to output *pdata value
,the result is a '?',why?

10-25-2005, 07:57 AM
Use glReadPixels instead.

10-25-2005, 08:13 AM
but I dont want to display the texture in the
window first,is there any method served to get the pixel RGB value in the input texture directly?

10-25-2005, 09:07 AM
Read the data you put when making your texture. There aren't any other solution to your problem.

10-25-2005, 09:55 AM
You can read data from a texture using glGetTexImage.