Original Post
Hello all, I am working on a Perlin noise generator. I got it working and displaying my image. When I go to save the image however using glReadPixels I get an image that has its row order swapped. In other words the bottom of the original image is the top of the one that I write out. I do: //heightmap (the array to hold my data) is declared as follows: BYTE heightmap[IMAGE_SIZE*IMAGE_SIZE]; glReadPixels( 0, 0, IMAGE_SIZE, IMAGE_SIZE, GL_RED, GL_UNSIGNED_BYTE, &heightmap); I have played with glPixelStore and it settings over and over and nothing has any effect? There is an option for skipping rows and pixels, and for swapping the pack and unpack byte orders, but NOTHING has any effect. Any ideas? Thanks in advance. J