views:

41

answers:

1

if i write

glColor4f(1.0,0,0, 1.0);

glReadPixels(touch1Point.x,viewport[3]-touch1Point.y, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, &pixelColor[0]);

pixelColor return 255 , 0 , 0

what is the right glReadPixels call that give me back 1.0 0 0 ?

+1  A: 

Divide each component of pixelColor by 255.0f

genpfault
ok thank you!!!