Hi am having a problem with glDrawPixels that mabye some one can help me with.
If the width is not a multiple of 4 I am getting the first line(the bottom line) comming out right and then every line above that the pixels are all wrong.

An example is the following
unsigned char picture[10*3] = {0};
for(int i =0; i < 30; i++){
picture[i] = 255;
glPixelZoom ( 20,20);

The bottem line is read and the top line is BLUE?? Can any one help?

Look up unpack alignment (glPixelStore and GL_UNPACK_ALIGNMENT). Unpack alignment tells OpenGL the alignment of the start of each row in the source image relative the start address.

Thank you so much, I was scratching my head all yesterday trying to figure out what the problem was. That did it. Stupid 4 byte allignment