10-04-2003, 10:28 AM
I have a texture class that currently loads .bmp, .tga, .dds, and jpg. Every thing works correctly with the exception that the bull**** jpeg texture lib reads the file backwards or something. Anyway my texture is upside down. I am not willing to change my texture coords just for jpegs nor should I have to. This is what I have done to remedy the situation but it is not working. Mabey someone else can help me.
I have got two unsgined char pointers:
ImageData and TempData;
after everthing loads TempData and ImageData are Identical this is the loop I am doing to reverse everything:
size = ImageWidth * ImageHeight * 4;
for(i = 0, j = size; i < size; i++, j--)
ImageData[i] = TempData[j];
I have got two unsgined char pointers:
ImageData and TempData;
after everthing loads TempData and ImageData are Identical this is the loop I am doing to reverse everything:
size = ImageWidth * ImageHeight * 4;
for(i = 0, j = size; i < size; i++, j--)
ImageData[i] = TempData[j];