Hey guys I learned about endianness and am still having difficulty understanding where things could go wrong. I was wondering what sort of things I should look for and how I should go about fixing it. I know I dont need to change anything for loading from text files and things like that but for example here is a snippet of my code for loading a dxt texture I am pretty sure endianness could cause some problems here what things do I need to change and why?
JGDXTHeader* header = (JGDXTHeader*)[data bytes];
width = header->width;
height = header->height;
uint blockSize;
int factor;
GLenum dxt;
uint pixelFormat = header->pixelFormat.fourCC;
if (pixelFormat == 0x31545844){
dxt = GL_COMPRESSED_RGBA_S3TC_DXT1_EXT;
blockSize = 8;
factor = 2;
}else if (pixelFormat == 0x33545844){
dxt = GL_COMPRESSED_RGBA_S3TC_DXT3_EXT;
blockSize = 16;
factor = 4;
}else if (pixelFormat == 0x35545844){
dxt = GL_COMPRESSED_RGBA_S3TC_DXT5_EXT;
blockSize = 16;
factor = 4;
}