2010-09-15 124 views
2

如果我写的OpenGL ES glReadPixels

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 

什么是正确的glReadPixels调用给我回1.0 0 0?

回答

1

鸿沟​​每个组件由255.0f

+0

OK谢谢! – 2010-09-17 12:31:08