Image Loading backwards....Please help

I am fairly new to OpenGL and am currently loading an image onto a polygon. The image is a lizard tech format (MrSID), which isn’t the issue at this point. My issue is that I am able to load the image but it is backwards, or I guess I could say it looks like I am looking at the image from the opposite side. any suggestions on how to fix this problem?

What do you mean here, I don’t understand…is it about texture mapping coordinates?

Yes, it is texture mapping coordinates. I believe it is the pixels that are loading incorrectly. So the pixel that should be at my (0,0) is loading to the opposite side. Lets just call it (1,0) for now.

Any ideas yet?

(x = 0, y = 0) is the bottom left and (1, 1) is the top right corner in the OpenGL coordinate system. The first pixel you load is assigned the coordinate (0, 0). Each row gets an increasing y coordinate and the final pixel will have the coordinate (1, 1).

I suppose your image is flipped upside down since when you load your images you get the image data stored from top to bottom while OpenGL expects it from bottom to top (like .tga files normally store them).

You will have to either flip the images horizontally or adjust your texture coordinates on the fly.

[ | vector_math (3d math library) | software renderer ]

Actually it is loading right side up, it is just facing the wrong way. What should be the right side is on the left…