maybe play with packing, alignment, etc :
glPixelStorei(GL_UNPACK_ALIGNMENT,1);
Zbuffer,
The image colors are perfect, everything is perfect. The only issue is that on some machines when you glReadPixel a 100x100 area you get 98x98 image with a border (the empty bitmap color) on the bottom left sides of 2 pixels.
When you use glReadPixel on a 100x100 viewport do you always get a 100x100 image or some small offset can appear?
Why if I glReadPixel at 10,10 one square of 10x10 pixel I get the 10x10 image at 10,12?
Thanks,
Alberto
Hey All,
I found the reason!!!
I was using this.Width and this.Height like viewport[2] and viewport[3] but the two couples of values are not the same!
using viewport[2] & viewport[3] everywhere solves the problem.
Thanks so much again,
Alberto