BMP Texture problems

I try to diplay a texture, and only some type of BMP Files works…
Why??? And how to read a Gif or a Jpg file ??
Le Bayonnais

I think you have to use a certain size for the bitmap file you are loading. such as a power of 2 (think binary)
or something like that, dont use wierd sizes like 33x101, loaders just dont like that

you need to get a reader program if you want to use .jpg, .gif, .rgb, or anything for that matter!
there are some exaples in the siggraph section of’s tutorials

Well, it doesn’t really matter… It has something to do with the data alignment. Are you using glPixelStore? Something like:

glPixelStoref(GL_UNPACK_SWAP_BYTES, 0);
glPixelStoref(GL_UNPACK_SKIP_ROWS, 0);
glPixelStoref(GL_UNPACK_SKIP_PIXELS, 0);
glPixelStoref(GL_UNPACK_ALIGNMENT, 4); // word alignment

This controls how data is read from client memory.

You may have the problem of trying to load a 256 color bitmap when your loader is set up for RGB or RGBA bitmaps. (8 bit, 24bit, 32bit) so make sure your bitmaps are all the correct format for your loader. If you post the loader source code we can look to see what may be going wrong.