OK, I need to read in 24-bit bitmaps and use them for textures in my application. It’s working, but the textures are all black with just red, green, and blue specs in them! Here’s my source thus far.
//For now, only use 128x128 images
//Open bitmap file
//Read in fileheader
//Read in infoheader
for(short int Y = 0; Y < Height; Y++)
for(short int X = 0; X < Width; X++)
fread(&Quad, sizeof(RGBQUAD), 1, TexFile);
Image[Y][X] = Quad.rgbRed;
Image[Y][X] = Quad.rgbGreen;
Image[Y][X] = Quad.rgbBlue;
//Generate, bind, and build mip-maps
//Return to main loop
I want to use just the RGB format because I have no use for alpha at this time. What am I doing wrong here?