Hi all, after months of reading, this is my first post here; I hope somebody can solve a weird problem I am suffering loading dds image files into my app. (My english is very bad but i’ll try my best)
I have followed all steps covered in the texture compression tutorial from the nVidia SDK and when I display the texture this is rendered vertically reversed; I noticed that, in the nVidia demo, the image files are previously reversed to achieve the desired results, but this disappointed me because I have seen a lot of demos and games that use compression and dds files that are “right” (i.e. Humus demos, but i can’t follow the code of his über framework (your work is awesome)).
So, it will be very nice if someone could spare some gl_lights on this… i’m very, very lost.
What is upside down is defined by what way you decide you want your texture coordinates to go. I prefer my upper-left corner of the texture to map to (0,0) and the lower-left be (0,1). Others prefer it the other way around. Depending on different definition different image file formats are stored with y going in different directions. For me .bmp and .tga are upside down while .dds are the right way. If you have loaded .bmp or .tga just the way they are in the file, .dds files will appear upside down. In my code, I flip the .tga and .bmp files to match what I consider be the right way.
Well, the TGA format has a byte in the header that tells you in what direction the image is stored. It’s the byte right after the byte that tells you the number of bits per pixel. If this byte has bit 6 set (0x20), then the image is stored bottom to top, and your image loader should handle this respectively. Some image editing programs do not give you this option (photoshop does not I believe) and some do (the GIMP for instance).
[This message has been edited by fenris (edited 03-20-2003).]