I have drawn an image file with the GIMP and saved it as a .c file. Then I used the following in my OpenGL code to load the image onto the screen:
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
glRasterPos2i(x_disp, 0);
glDrawPixels(80, 80, GL_RGB, GL_UNSIGNED_BYTE, gimp_image.pixel_data);
However the image loaded appear flipped 180 degrees upside down. I wonder whether there is an option I can supply in OpenGL so that I can have the image rendered with the same orientation as in GIMP, with the top side up, and the left side on the left, perhaps with glPixelStore or some other OpenGL function call to specify how to unpack the pixels?